mirror of
https://github.com/mempool/mempool.git
synced 2025-04-23 23:10:45 +02:00
Merge pull request #5876 from mempool/natsoni/fix-hashrate-chart-overflow
Fix cropped difficulty series in hashrate chart
This commit is contained in:
commit
f218ff26ab
@ -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)',
|
||||
|
Loading…
x
Reference in New Issue
Block a user