From 59a1c625be20752dd48bb9b812fffe99a76d4b9e Mon Sep 17 00:00:00 2001 From: natsoni Date: Fri, 30 May 2025 13:03:58 +0200 Subject: [PATCH] Fix missing y axis on difficulty chart --- .../components/hashrate-chart/hashrate-chart.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 b687415aa..f8dc73b88 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -364,8 +364,11 @@ export class HashrateChartComponent implements OnInit { { type: 'value', position: 'right', - min: (_) => { + min: (value) => { const firstYAxisMin = this.chartInstance.getModel().getComponent('yAxis', 0).axis.scale.getExtent()[0]; + if (firstYAxisMin === Infinity) { + return value.min; + } const selectedPowerOfTen: any = selectPowerOfTen(firstYAxisMin); const newMin = Math.floor(firstYAxisMin / selectedPowerOfTen.divider / 10) return 600 / 2 ** 32 * newMin * selectedPowerOfTen.divider * 10;