mirror of
https://github.com/mempool/mempool.git
synced 2025-09-27 02:06:34 +02:00
Fix cropped difficulty series in hashrate chart
This commit is contained in:
@@ -370,9 +370,10 @@ export class HashrateChartComponent implements OnInit {
|
|||||||
const newMin = Math.floor(firstYAxisMin / selectedPowerOfTen.divider / 10)
|
const newMin = Math.floor(firstYAxisMin / selectedPowerOfTen.divider / 10)
|
||||||
return 600 / 2 ** 32 * newMin * 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];
|
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: {
|
axisLabel: {
|
||||||
color: 'rgb(110, 112, 121)',
|
color: 'rgb(110, 112, 121)',
|
||||||
|
Reference in New Issue
Block a user