Commit fa7e68db by lyy

echarts图表显示问题

parent 7f70d060
...@@ -265,7 +265,9 @@ ...@@ -265,7 +265,9 @@
queryXMinfoList:[], queryXMinfoList:[],
dataList:['项目名称','计划完成时间','计划产量','实际产量','生产进度','发货进度'], dataList:['项目名称','计划完成时间','计划产量','实际产量','生产进度','发货进度'],
testList:[] testList:[],
extremes:{},
}; };
}, },
mounted() { mounted() {
...@@ -468,12 +470,33 @@ ...@@ -468,12 +470,33 @@
IPLAT.EiCommunicator.send('HPBI003', 'queryZHCLInfo', inInfo, { IPLAT.EiCommunicator.send('HPBI003', 'queryZHCLInfo', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
_this.queryZHCLInfoList = res.extAttr.result; _this.queryZHCLInfoList = res.extAttr.result;
_this.queryZHCLInfoList.forEach(item => {
item.label = { // _this.queryZHCLInfoList.forEach(item => {
show: true, // item.label = {
position: 'top' // show: true,
}; // position: 'top'
// };
// });
var overallMax = -Infinity;
var overallMin = Infinity;
_this.queryZHCLInfoList.forEach(series => {
series.data.forEach(value => {
if (value > overallMax) {
overallMax = value; // 更新整体最大值
}
if (value < overallMin) {
overallMin = value; // 更新整体最小值
}
});
}); });
_this.extremes = {
max: overallMax,
min: overallMin
};
console.log('extremes',_this.extremes);
console.log('queryZHCLInfoArray',_this.queryZHCLInfoList) console.log('queryZHCLInfoArray',_this.queryZHCLInfoList)
_this.queryZHCLInfoArray = res.extAttr.name; _this.queryZHCLInfoArray = res.extAttr.name;
console.log('queryZHCLInfoArray',_this.queryZHCLInfoArray) console.log('queryZHCLInfoArray',_this.queryZHCLInfoArray)
...@@ -494,6 +517,9 @@ ...@@ -494,6 +517,9 @@
color: '#A4B3C5', color: '#A4B3C5',
fontSize: 14, fontSize: 14,
}, },
tooltip:{
trigger: 'axis'
},
legend: { legend: {
data: this.queryZHCLInfoArray, data: this.queryZHCLInfoArray,
textStyle: { textStyle: {
...@@ -513,9 +539,14 @@ ...@@ -513,9 +539,14 @@
data: this.queryZHCLInfoDate data: this.queryZHCLInfoDate
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
max:this.extremes.max+1,
min:this.extremes.min,
axisLabel: {
show:false
}
}, },
series: this.queryZHCLInfoList series: this.queryZHCLInfoList,
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment