Fix linting and unclosed html tag.
Fix no shadowed variable tslint warning.
This commit is contained in:
parent
d376ba1c61
commit
fa7a45421e
@ -176,16 +176,19 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
|||||||
},
|
},
|
||||||
formatter: (params: any) => {
|
formatter: (params: any) => {
|
||||||
const legendName = (index: number) => this.feeLevelsOrdered[index];
|
const legendName = (index: number) => this.feeLevelsOrdered[index];
|
||||||
const colorSpan = (index: number) => `<span class="indicator" style="background-color: ${chartColors[index]}"></span><span>${legendName(index)}`;
|
const colorSpan = (index: number) => `<span class="indicator" style="background-color: ${chartColors[index]}"></span><span>${legendName(index)}</span>`;
|
||||||
const totals = (values: any) => {
|
const totals = (values: any) => {
|
||||||
let totalValue = 0;
|
let totalValueTemp = 0;
|
||||||
const totalValueArray = [];
|
const totalValueArrayTemp = [];
|
||||||
const valuesInverted = values.slice(0).reverse();
|
const valuesInverted = values.slice(0).reverse();
|
||||||
for (const item of valuesInverted) {
|
for (const item of valuesInverted) {
|
||||||
totalValue += item.value;
|
totalValueTemp += item.value;
|
||||||
totalValueArray.push(totalValue);
|
totalValueArrayTemp.push(totalValueTemp);
|
||||||
}
|
}
|
||||||
return { totalValue, totalValueArray: totalValueArray.reverse() };
|
return {
|
||||||
|
totalValue: totalValueTemp,
|
||||||
|
totalValueArray: totalValueArrayTemp.reverse()
|
||||||
|
};
|
||||||
};
|
};
|
||||||
const { totalValue, totalValueArray } = totals(params);
|
const { totalValue, totalValueArray } = totals(params);
|
||||||
const title = `<div class="title">${params[0].axisValue}
|
const title = `<div class="title">${params[0].axisValue}
|
||||||
@ -203,8 +206,16 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
|||||||
let activeItemClass = '';
|
let activeItemClass = '';
|
||||||
if (this.hoverIndexSerie === index) {
|
if (this.hoverIndexSerie === index) {
|
||||||
progressPercentageText = `<div class="total-parcial-active">
|
progressPercentageText = `<div class="total-parcial-active">
|
||||||
<span class="progress-percentage">${progressPercentage.toFixed(2)} <span class="symbol">%</span></span><span class="total-parcial-vbytes">${this.vbytesPipe.transform(totalParcial, 2, 'vB', 'MvB', false)}</span>
|
<span class="progress-percentage">
|
||||||
<div class="total-percentage-bar"><span><span style="width: ${progressPercentage}%; background: ${chartColors[index]}"></span></span></div>
|
${progressPercentage.toFixed(2)}
|
||||||
|
<span class="symbol">%</span>
|
||||||
|
</span>
|
||||||
|
<span class="total-parcial-vbytes">${this.vbytesPipe.transform(totalParcial, 2, 'vB', 'MvB', false)}</span>
|
||||||
|
<div class="total-percentage-bar">
|
||||||
|
<span>
|
||||||
|
<span style="width: ${progressPercentage}%; background: ${chartColors[index]}"></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
activeItemClass = 'active';
|
activeItemClass = 'active';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user