From 25e9741fc2b74d6a394c822a41294ab8ef989163 Mon Sep 17 00:00:00 2001 From: natsoni Date: Sat, 22 Jun 2024 15:01:42 +0900 Subject: [PATCH] Set same start time for BTC and USD lines --- .../app/components/address-graph/address-graph.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/address-graph/address-graph.component.ts b/frontend/src/app/components/address-graph/address-graph.component.ts index f4967f740..86090a0d2 100644 --- a/frontend/src/app/components/address-graph/address-graph.component.ts +++ b/frontend/src/app/components/address-graph/address-graph.component.ts @@ -168,7 +168,8 @@ export class AddressGraphComponent implements OnChanges, OnDestroy { if (this.period !== 'all') { const start = now - (periodSeconds[this.period] * 1000); this.data = this.data.filter(d => d[0] >= start); - this.fiatData = this.fiatData.filter(d => d[0] >= start); + const startFiat = this.data[0]?.[0] ?? start; // Make sure USD data starts at the same time as BTC data + this.fiatData = this.fiatData.filter(d => d[0] >= startFiat); } this.data.push( {value: [now, this.stats.funded_txo_sum - this.stats.spent_txo_sum], symbol: 'none', tooltip: { show: false }}