mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 17:47:01 +01:00
[mempool graph] show horizontal guide line
This commit is contained in:
parent
3b4dd7e633
commit
7bb34fe090
1 changed files with 12 additions and 3 deletions
|
@ -181,7 +181,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
||||||
alwaysShowContent: false,
|
alwaysShowContent: false,
|
||||||
position: (pos, params, el, elRect, size) => {
|
position: (pos, params, el, elRect, size) => {
|
||||||
const positions = { top: (this.template === 'advanced') ? 0 : -30 };
|
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;
|
return positions;
|
||||||
},
|
},
|
||||||
extraCssText: `width: ${(this.template === 'advanced') ? '275px' : '200px'};
|
extraCssText: `width: ${(this.template === 'advanced') ? '275px' : '200px'};
|
||||||
|
@ -189,10 +189,19 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;`,
|
box-shadow: none;`,
|
||||||
axisPointer: {
|
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) => {
|
formatter: (params: any) => {
|
||||||
const axisValueLabel: string = formatterXAxis(this.locale, this.windowPreference, params[0].axisValue);
|
const axisValueLabel: string = formatterXAxis(this.locale, this.windowPreference, params[0].axisValue);
|
||||||
const { totalValue, totalValueArray } = this.getTotalValues(params);
|
const { totalValue, totalValueArray } = this.getTotalValues(params);
|
||||||
const itemFormatted = [];
|
const itemFormatted = [];
|
||||||
let totalParcial = 0;
|
let totalParcial = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue