mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Fix difficulty chart xaxis label
This commit is contained in:
parent
9b4e7a5fe1
commit
6d4458db8b
1 changed files with 7 additions and 6 deletions
|
@ -114,15 +114,13 @@ export class DifficultyChartComponent implements OnInit {
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: {
|
||||||
{
|
type: 'time',
|
||||||
type: 'time',
|
splitNumber: this.isMobile() ? 5 : 10,
|
||||||
}
|
},
|
||||||
],
|
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: 11,
|
|
||||||
formatter: (val) => {
|
formatter: (val) => {
|
||||||
const diff = val / Math.pow(10, 12); // terra
|
const diff = val / Math.pow(10, 12); // terra
|
||||||
return diff.toString() + 'T';
|
return diff.toString() + 'T';
|
||||||
|
@ -150,4 +148,7 @@ export class DifficultyChartComponent implements OnInit {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isMobile() {
|
||||||
|
return (window.innerWidth <= 767.98);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue