Fix cropped difficulty series in hashrate chart

This commit is contained in:
natsoni
2025-04-14 17:42:11 +02:00
parent eb4d2f5732
commit 411beb1c95

View File

@@ -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)',