From ab079e9372a6d9506a2a7dcdb03cdd5ec613b118 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 21 Nov 2023 16:36:46 +0900 Subject: [PATCH] Fix mempool graph tooltip width & vb precision --- .../mempool-graph/mempool-graph.component.ts | 12 ++++++------ frontend/src/styles.scss | 2 +- 2 files changed, 7 insertions(+), 7 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 435711e48..79c426fd6 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts @@ -230,7 +230,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { positions[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 100; return positions; }, - extraCssText: `width: ${(this.template === 'advanced') ? '275px' : '200px'}; + extraCssText: `width: ${(this.template === 'advanced') ? '300px' : '200px'}; background: transparent; border: none; box-shadow: none;`, @@ -254,7 +254,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { const axisValueLabel: string = formatterXAxis(this.locale, this.windowPreference, params[0].axisValue); const { totalValue, totalValueArray } = this.getTotalValues(params); const itemFormatted = []; - let totalParcial = 0; + let sum = 0; let progressPercentageText = ''; let countItem; let items = this.inverted ? [...params].reverse() : params; @@ -262,7 +262,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { countItem = items.pop(); } items.map((item: any, index: number) => { - totalParcial += item.value[1]; + sum += item.value[1]; const progressPercentage = (item.value[1] / totalValue) * 100; const progressPercentageSum = (totalValueArray[index] / totalValue) * 100; let activeItemClass = ''; @@ -279,7 +279,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { % - ${this.vbytesPipe.transform(totalParcial, 2, 'vB', 'MvB', false)} + ${this.vbytesPipe.transform(sum, 2, 'vB', 'MvB', false)}
@@ -303,12 +303,12 @@ export class MempoolGraphComponent implements OnInit, OnChanges { - ${this.vbytesPipe.transform(item.value[1], 2, 'vB', 'MvB', false)} + ${(item.value[1] / 1_000_000).toFixed(2)} MvB - ${this.vbytesPipe.transform(totalValueArray[index], 2, 'vB', 'MvB', false)} + ${(totalValueArray[index] / 1_000_000).toFixed(2)} MvB diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 078b6b30a..c03d79af5 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -519,7 +519,7 @@ html:lang(ru) .card-title { .fees-wrapper-tooltip-chart-advanced, .tx-wrapper-tooltip-chart-advanced { background: rgba(#1d1f31, 0.98); - width: 275px; + width: 300px; thead { th {