Fix statistics graphs

This commit is contained in:
Mononaut
2024-05-09 18:00:09 +00:00
parent d2f7864266
commit 5b2ecac1f6
3 changed files with 25 additions and 20 deletions

View File

@@ -231,8 +231,10 @@ export class DashboardComponent implements OnInit, OnDestroy, AfterViewInit {
this.stateService.live2Chart$
.pipe(
scan((acc, stats) => {
const now = Date.now() / 1000;
const start = now - (2 * 60 * 60);
acc.unshift(stats);
acc = acc.slice(0, 120);
acc = acc.filter(p => p.added >= start);
return acc;
}, (mempoolStats || []))
),