Fix difficulty chart xaxis label

This commit is contained in:
nymkappa 2022-02-17 18:30:52 +09:00
parent 9b4e7a5fe1
commit 6d4458db8b
No known key found for this signature in database
GPG key ID: E155910B16E8BD04

View file

@ -114,15 +114,13 @@ export class DifficultyChartComponent implements OnInit {
axisPointer: {
type: 'line',
},
xAxis: [
{
type: 'time',
}
],
xAxis: {
type: 'time',
splitNumber: this.isMobile() ? 5 : 10,
},
yAxis: {
type: 'value',
axisLabel: {
fontSize: 11,
formatter: (val) => {
const diff = val / Math.pow(10, 12); // terra
return diff.toString() + 'T';
@ -150,4 +148,7 @@ export class DifficultyChartComponent implements OnInit {
};
}
isMobile() {
return (window.innerWidth <= 767.98);
}
}