ceilNumber = (value: number) => {
let truncated = parseInt(`${value}`.slice(0, 2))
const mod = truncated % 5
if (mod === 0) {
truncated = truncated + 5
} else {
truncated = 5 - mod + truncated
}
return parseInt(`${truncated}${Array(`${Math.trunc(value)}`.slice(2).length).fill(0).join('')}`)
}
yAxis: [
max: ((value) => {
if (Array.isArray(value)) {
const max = Math.max(...value);
return ceilNumber(max);
}
return 0;
})(yxisDataValue),
interval: ((value) => {
if (Array.isArray(value)) {
const max = Math.max(...value);
return ceilNumber(max) / 5;
}
return 0;
})(yxisDataValue), Y轴数组
]