mirror of
https://github.com/mempool/mempool.git
synced 2024-12-28 17:24:25 +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',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: (val) => {
|
formatter: (val) => {
|
||||||
const diff = val / Math.pow(10, 12); // terra
|
const selectedPowerOfTen: any = selectPowerOfTen(val);
|
||||||
return diff.toString() + 'T';
|
const diff = val / selectedPowerOfTen.divider;
|
||||||
|
return `${diff} ${selectedPowerOfTen.unit}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
|
@ -106,7 +106,7 @@ export class HashrateChartComponent implements OnInit {
|
|||||||
formatter: (val) => {
|
formatter: (val) => {
|
||||||
const selectedPowerOfTen: any = selectPowerOfTen(val);
|
const selectedPowerOfTen: any = selectPowerOfTen(val);
|
||||||
const newVal = val / selectedPowerOfTen.divider;
|
const newVal = val / selectedPowerOfTen.divider;
|
||||||
return `${newVal} ${selectedPowerOfTen.unit}`
|
return `${newVal} ${selectedPowerOfTen.unit}H/s`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
|
Loading…
Reference in New Issue
Block a user