修改图
parent
c25afd6996
commit
0a18eca2ed
|
|
@ -230,9 +230,15 @@ export default {
|
||||||
seriesData.push(resData[key])
|
seriesData.push(resData[key])
|
||||||
})
|
})
|
||||||
const max = Math.max(...seriesData)
|
const max = Math.max(...seriesData)
|
||||||
let maxN = Math.ceil(max / 5) * 5
|
|
||||||
maxN = maxN === 0 ? 5 : maxN
|
if (max > 5) {
|
||||||
this.opts.yAxis.data[0].max = maxN
|
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 = {
|
let res = {
|
||||||
categories: xAxis,
|
categories: xAxis,
|
||||||
series: [
|
series: [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue