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 eeaa0b00a..63e051a1c 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts @@ -176,16 +176,19 @@ export class MempoolGraphComponent implements OnInit, OnChanges { }, formatter: (params: any) => { const legendName = (index: number) => this.feeLevelsOrdered[index]; - const colorSpan = (index: number) => `${legendName(index)}`; + const colorSpan = (index: number) => `${legendName(index)}`; const totals = (values: any) => { - let totalValue = 0; - const totalValueArray = []; + let totalValueTemp = 0; + const totalValueArrayTemp = []; const valuesInverted = values.slice(0).reverse(); for (const item of valuesInverted) { - totalValue += item.value; - totalValueArray.push(totalValue); + totalValueTemp += item.value; + totalValueArrayTemp.push(totalValueTemp); } - return { totalValue, totalValueArray: totalValueArray.reverse() }; + return { + totalValue: totalValueTemp, + totalValueArray: totalValueArrayTemp.reverse() + }; }; const { totalValue, totalValueArray } = totals(params); const title = `
${params[0].axisValue} @@ -203,8 +206,16 @@ export class MempoolGraphComponent implements OnInit, OnChanges { let activeItemClass = ''; if (this.hoverIndexSerie === index) { progressPercentageText = `
- ${progressPercentage.toFixed(2)} %${this.vbytesPipe.transform(totalParcial, 2, 'vB', 'MvB', false)} -
+ + ${progressPercentage.toFixed(2)} + % + + ${this.vbytesPipe.transform(totalParcial, 2, 'vB', 'MvB', false)} +
+ + + +
`; activeItemClass = 'active'; }