mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 17:47:01 +01:00
Merge pull request #376 from jambolo/master
Fix mempool-graph legend off-by-one
This commit is contained in:
commit
84737bca6e
1 changed files with 10 additions and 10 deletions
|
@ -78,22 +78,22 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.showLegend) {
|
if (this.showLegend) {
|
||||||
this.mempoolVsizeFeesOptions.plugins.push(
|
const legendNames: string[] = [1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 125, 150, 175, 200,
|
||||||
Chartist.plugins.legend({
|
|
||||||
legendNames: [1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 125, 150, 175, 200,
|
|
||||||
250, 300, 350, 400].map((sat, i, arr) => {
|
250, 300, 350, 400].map((sat, i, arr) => {
|
||||||
if (sat === 400) {
|
if (sat === 400) {
|
||||||
return '350+';
|
return '350+';
|
||||||
}
|
}
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
if (this.stateService.network === 'liquid') {
|
|
||||||
return '0 - 1';
|
return '0 - 1';
|
||||||
}
|
}
|
||||||
return '1 sat/vB';
|
|
||||||
}
|
|
||||||
return arr[i - 1] + ' - ' + sat;
|
return arr[i - 1] + ' - ' + sat;
|
||||||
})
|
});
|
||||||
})
|
// Only Liquid has lower than 1 sat/vb transactions
|
||||||
|
if (this.stateService.network !== 'liquid') {
|
||||||
|
legendNames.shift();
|
||||||
|
}
|
||||||
|
this.mempoolVsizeFeesOptions.plugins.push(
|
||||||
|
Chartist.plugins.legend({ legendNames: legendNames })
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue