修改图

wechat
ihzero 2023-09-26 18:06:11 +08:00
parent c25afd6996
commit 0a18eca2ed
1 changed files with 9 additions and 3 deletions

View File

@ -230,9 +230,15 @@ export default {
seriesData.push(resData[key])
})
const max = Math.max(...seriesData)
if (max > 5) {
let maxN = Math.ceil(max / 5) * 5
maxN = maxN === 0 ? 5 : maxN
this.opts.yAxis.data[0].max = maxN
} else {
this.opts.yAxis.splitNumber = max
}
let res = {
categories: xAxis,
series: [