From 411beb1c9569e7621e1e5502212d3819e0af997e Mon Sep 17 00:00:00 2001 From: natsoni Date: Mon, 14 Apr 2025 17:42:11 +0200 Subject: [PATCH] Fix cropped difficulty series in hashrate chart --- .../components/hashrate-chart/hashrate-chart.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts index d53916b97..b687415aa 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -370,9 +370,10 @@ export class HashrateChartComponent implements OnInit { const newMin = Math.floor(firstYAxisMin / selectedPowerOfTen.divider / 10) return 600 / 2 ** 32 * newMin * selectedPowerOfTen.divider * 10; }, - max: (_) => { + max: (value) => { const firstYAxisMax = this.chartInstance.getModel().getComponent('yAxis', 0).axis.scale.getExtent()[1]; - return 600 / 2 ** 32 * firstYAxisMax; + const scaledMax = 600 / 2 ** 32 * firstYAxisMax; + return Math.max(scaledMax, value.max); }, axisLabel: { color: 'rgb(110, 112, 121)',