From 7bb34fe090a395779c8d62f305e9d1bd62b3758e Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 11 May 2023 14:30:57 +0200 Subject: [PATCH] [mempool graph] show horizontal guide line --- .../mempool-graph/mempool-graph.component.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts index cc53f425d..416b8f538 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts @@ -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,10 +189,19 @@ 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); + const axisValueLabel: string = formatterXAxis(this.locale, this.windowPreference, params[0].axisValue); const { totalValue, totalValueArray } = this.getTotalValues(params); const itemFormatted = []; let totalParcial = 0;