图形小数点
parent
1d943e1957
commit
4970ad75d8
|
|
@ -144,8 +144,10 @@ export default {
|
|||
rotateAngle: 30,
|
||||
},
|
||||
yAxis: {
|
||||
min: 1,
|
||||
data: [
|
||||
{
|
||||
tofix: 1,
|
||||
min: 0,
|
||||
},
|
||||
],
|
||||
|
|
@ -219,7 +221,7 @@ export default {
|
|||
}
|
||||
)
|
||||
const { data: resData } = data
|
||||
|
||||
|
||||
const xAxis = []
|
||||
const seriesData = []
|
||||
|
||||
|
|
@ -227,7 +229,10 @@ export default {
|
|||
xAxis.push(key)
|
||||
seriesData.push(resData[key])
|
||||
})
|
||||
|
||||
const max = Math.max(...seriesData)
|
||||
let maxN = Math.ceil(max / 5) * 5
|
||||
maxN = maxN === 0 ? 5 : maxN
|
||||
this.opts.yAxis.data[0].max = maxN
|
||||
let res = {
|
||||
categories: xAxis,
|
||||
series: [
|
||||
|
|
@ -235,7 +240,6 @@ export default {
|
|||
name: '虫情统计',
|
||||
data: seriesData,
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
this.chartData = JSON.parse(JSON.stringify(res))
|
||||
|
|
|
|||
Loading…
Reference in New Issue