Add mempool count line to graph

This commit is contained in:
Mononaut
2023-09-06 08:19:41 +09:00
parent 827b0f6ad1
commit 71d4aa9ddd
5 changed files with 100 additions and 13 deletions

View File

@@ -69,6 +69,12 @@
</button>
<div class="dropdown-fees" ngbDropdownMenu aria-labelledby="dropdownFees">
<ul>
<li (click)="this.showCount = !this.showCount"
[class]="this.showCount ? '' : 'inactive'">
<span class="square" [ngStyle]="{'backgroundColor': 'white'}"></span>
<span class="fee-text">{{ titleCount }}</span>
</li>
<hr style="margin: 4px;">
<ng-template ngFor let-feeData let-i="index" [ngForOf]="feeLevelDropdownData">
<ng-template [ngIf]="feeData.fee <= (feeLevels[maxFeeIndex])">
<li (click)="filterFeeIndex = feeData.fee"
@@ -92,8 +98,8 @@
</div>
<div class="card-body">
<div class="incoming-transactions-graph">
<app-mempool-graph #mempoolgraph dir="ltr" [template]="'advanced'"
[limitFilterFee]="filterFeeIndex" [height]="500" [left]="65" [right]="10"
<app-mempool-graph #mempoolgraph dir="ltr" [template]="'advanced'" [hideCount]="!showCount"
[limitFilterFee]="filterFeeIndex" [height]="500" [left]="65" [right]="showCount ? 50 : 10"
[data]="mempoolStats && mempoolStats.length ? mempoolStats : null"></app-mempool-graph>
</div>
</div>

View File

@@ -32,6 +32,7 @@ export class StatisticsComponent implements OnInit {
chartColors = chartColors;
filterSize = 100000;
filterFeeIndex = 1;
showCount = true;
maxFeeIndex: number;
dropDownOpen = false;
@@ -46,6 +47,7 @@ export class StatisticsComponent implements OnInit {
inverted: boolean;
feeLevelDropdownData = [];
timespan = '';
titleCount = $localize`Count`;
constructor(
@Inject(LOCALE_ID) private locale: string,