mirror of
https://github.com/mempool/mempool.git
synced 2024-12-28 01:04:28 +01:00
Show unit in the yaxis for hashrate chart
This commit is contained in:
parent
beeda5fa87
commit
b2f872c4cc
@ -116,8 +116,9 @@ export class DifficultyChartComponent implements OnInit {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
formatter: (val) => {
|
||||
const diff = val / Math.pow(10, 12); // terra
|
||||
return diff.toString() + 'T';
|
||||
const selectedPowerOfTen: any = selectPowerOfTen(val);
|
||||
const diff = val / selectedPowerOfTen.divider;
|
||||
return `${diff} ${selectedPowerOfTen.unit}`;
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
|
@ -106,7 +106,7 @@ export class HashrateChartComponent implements OnInit {
|
||||
formatter: (val) => {
|
||||
const selectedPowerOfTen: any = selectPowerOfTen(val);
|
||||
const newVal = val / selectedPowerOfTen.divider;
|
||||
return `${newVal} ${selectedPowerOfTen.unit}`
|
||||
return `${newVal} ${selectedPowerOfTen.unit}H/s`
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
|
Loading…
Reference in New Issue
Block a user