From cb3326d6917344ecf2999ebd95ac86d097df16eb Mon Sep 17 00:00:00 2001 From: natsoni Date: Tue, 19 Nov 2024 19:32:28 +0100 Subject: [PATCH] Wrap large amounts in power of ten in address graph --- .../app/components/address-graph/address-graph.component.ts | 3 +++ 1 file changed, 3 insertions(+) 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 2cc3406fb..e4c38c897 100644 --- a/frontend/src/app/components/address-graph/address-graph.component.ts +++ b/frontend/src/app/components/address-graph/address-graph.component.ts @@ -319,6 +319,9 @@ export class AddressGraphComponent implements OnChanges, OnDestroy { } else if (valSpan > 10_000_000) { return `${(val / 100_000_000).toFixed(2)} BTC`; } else if (valSpan > 1_000_000) { + if (maxValue > 100_000_000_000) { + return `${this.amountShortenerPipe.transform(Math.round(val / 100_000_000), 3, undefined, true)} BTC`; + } return `${(val / 100_000_000).toFixed(3)} BTC`; } else { return `${this.amountShortenerPipe.transform(val, 0, undefined, true)} sats`;