mirror of
https://github.com/mempool/mempool.git
synced 2025-01-01 03:04:27 +01:00
Merge pull request #868 from MiguelMedeiros/fix-tooltip-dashboard
UI/UX: Fix mempool chart tooltip at dashboard component.
This commit is contained in:
commit
6f9762d50b
@ -85,8 +85,8 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
|||||||
generateArray(mempoolStats: OptimizedMempoolStats[]) {
|
generateArray(mempoolStats: OptimizedMempoolStats[]) {
|
||||||
const finalArray: number[][] = [];
|
const finalArray: number[][] = [];
|
||||||
let feesArray: number[] = [];
|
let feesArray: number[] = [];
|
||||||
|
const limitFeesTemplate = this.template === 'advanced' ? 28 : 21;
|
||||||
for (let index = 28; index > -1; index--) {
|
for (let index = limitFeesTemplate; index > -1; index--) {
|
||||||
feesArray = [];
|
feesArray = [];
|
||||||
mempoolStats.forEach((stats) => {
|
mempoolStats.forEach((stats) => {
|
||||||
feesArray.push(stats.vsizes[index] ? stats.vsizes[index] : 0);
|
feesArray.push(stats.vsizes[index] ? stats.vsizes[index] : 0);
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template [ngIf]="!inverted">
|
<ng-template [ngIf]="!inverted">
|
||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i - 1]}"></span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<span class="fee-text" >0 - {{ fee }}</span>
|
<span class="fee-text" >0 - {{ fee }}</span>
|
||||||
</li>
|
</li>
|
||||||
@ -62,8 +62,8 @@
|
|||||||
<span class="fee-text" >{{feeLevels[i - 1]}} - {{ fee }}</span>
|
<span class="fee-text" >{{feeLevels[i - 1]}} - {{ fee }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template [ngIf]="!inverted">
|
<ng-template [ngIf]="!inverted">
|
||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i - 1]}"></span>
|
||||||
<span class="fee-text" >{{feeLevels[i + 1]}} - {{ fee }}</span>
|
<span class="fee-text" >{{feeLevels[i + 1]}} - {{ fee }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</li>
|
</li>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
<app-mempool-graph
|
<app-mempool-graph
|
||||||
[template]="'widget'"
|
[template]="'widget'"
|
||||||
[limitFee]="150"
|
[limitFee]="150"
|
||||||
|
[limitFilterFee]="1"
|
||||||
[data]="mempoolStats.mempool"
|
[data]="mempoolStats.mempool"
|
||||||
></app-mempool-graph>
|
></app-mempool-graph>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user