Merge pull request #3749 from mempool/nymkappa/fix-3747

[mempool graph] show horizontal guide line
This commit is contained in:
softsimon 2023-05-12 10:54:05 -05:00 committed by GitHub
commit 97c8ace8f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
alwaysShowContent: false,
position: (pos, params, el, elRect, size) => {
const positions = { top: (this.template === 'advanced') ? 0 : -30 };
positions[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 60;
positions[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 100;
return positions;
},
extraCssText: `width: ${(this.template === 'advanced') ? '275px' : '200px'};
@ -189,7 +189,16 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
border: none;
box-shadow: none;`,
axisPointer: {
type: 'line',
type: 'cross',
label: {
formatter: (params: any) => {
if (params.axisDimension === 'y') {
return this.vbytesPipe.transform(params.value, 2, 'vB', 'MvB', true)
} else {
return formatterXAxis(this.locale, this.windowPreference, params.value);
}
}
}
},
formatter: (params: any) => {
const axisValueLabel: string = formatterXAxis(this.locale, this.windowPreference, params[0].axisValue);