|
@@ -146,7 +146,7 @@
|
|
|
return site.time
|
|
|
})
|
|
|
let data = res.data.map(site => {
|
|
|
- return type1 == 1 ? site.orderSum : site.no
|
|
|
+ return type1 == 1 ? site.no : site.orderSum
|
|
|
})
|
|
|
if (type2 == 'creat') {
|
|
|
this.creatChart(type1, column, data)
|
|
@@ -177,6 +177,7 @@
|
|
|
// 创建图表
|
|
|
creatChart(type, column, data) {
|
|
|
console.log(data)
|
|
|
+ let maxNum = (Math.ceil(Math.max(...data)/5))*5
|
|
|
let option = {
|
|
|
$this: _self,
|
|
|
canvasId: "chartBox" + type,
|
|
@@ -201,8 +202,12 @@
|
|
|
},
|
|
|
yAxis: {
|
|
|
format: (val) => {
|
|
|
- return '¥' + parseFloat(val.toFixed(2))
|
|
|
- }
|
|
|
+ return parseFloat(val.toFixed(2))
|
|
|
+ // return (type == 1 ? parseInt(val) : parseFloat(val.toFixed(2)))
|
|
|
+ },
|
|
|
+ min:0,
|
|
|
+ max:maxNum,
|
|
|
+ splitNumber: 5
|
|
|
},
|
|
|
categories: column,
|
|
|
legend: {
|