|
@@ -235,7 +235,7 @@ export function getLine(id, legendData, x, data) {
|
|
|
Message.error("没有找到报表数据,请检查!");
|
|
|
return;
|
|
|
}
|
|
|
- let maxMin = getMax(data); // 计算最大值
|
|
|
+ let max = getMax(data); // 计算最大值
|
|
|
var myChart = EC.init(document.getElementById(id));
|
|
|
let option = {
|
|
|
tooltip: {
|
|
@@ -280,10 +280,10 @@ export function getLine(id, legendData, x, data) {
|
|
|
axisTick: {
|
|
|
show: false
|
|
|
},
|
|
|
- min:maxMin[0][1],
|
|
|
- max:maxMin[0][0],
|
|
|
- splitNumber:5,
|
|
|
- interval: (maxMin[0][0]-maxMin[0][1])/5
|
|
|
+ min: 0,
|
|
|
+ max: max[0],
|
|
|
+ splitNumber: 5,
|
|
|
+ interval: max[0]/5
|
|
|
},
|
|
|
{
|
|
|
type: 'value',
|
|
@@ -294,10 +294,10 @@ export function getLine(id, legendData, x, data) {
|
|
|
axisTick: {
|
|
|
show: false
|
|
|
},
|
|
|
- min:maxMin[1][1],
|
|
|
- max:maxMin[1][0],
|
|
|
- splitNumber:5,
|
|
|
- interval: (maxMin[1][0]-maxMin[1][1])/5
|
|
|
+ min: 0,
|
|
|
+ max: max[1],
|
|
|
+ splitNumber: 5,
|
|
|
+ interval: max[1]/5
|
|
|
}],
|
|
|
series: data
|
|
|
};
|
|
@@ -314,10 +314,7 @@ export function getMax(data) {
|
|
|
d0 = d0.concat(item.data)
|
|
|
}
|
|
|
});
|
|
|
- return [
|
|
|
- [BASE.numberCeil(Math.max.apply(null,d0)), Math.min.apply(null,d0)],
|
|
|
- [BASE.numberCeil(Math.max.apply(null,d1)), Math.min.apply(null,d1)]
|
|
|
- ]
|
|
|
+ return [BASE.numberCeil(Math.max.apply(null,d0)), BASE.numberCeil(Math.max.apply(null,d1))]
|
|
|
}
|
|
|
|
|
|
/*
|