Commit fa7e68db by lyy

echarts图表显示问题

parent 7f70d060
......@@ -265,7 +265,9 @@
queryXMinfoList:[],
dataList:['项目名称','计划完成时间','计划产量','实际产量','生产进度','发货进度'],
testList:[]
testList:[],
extremes:{},
};
},
mounted() {
......@@ -468,12 +470,33 @@
IPLAT.EiCommunicator.send('HPBI003', 'queryZHCLInfo', inInfo, {
onSuccess: function (res) {
_this.queryZHCLInfoList = res.extAttr.result;
_this.queryZHCLInfoList.forEach(item => {
item.label = {
show: true,
position: 'top'
};
// _this.queryZHCLInfoList.forEach(item => {
// item.label = {
// 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)
_this.queryZHCLInfoArray = res.extAttr.name;
console.log('queryZHCLInfoArray',_this.queryZHCLInfoArray)
......@@ -494,6 +517,9 @@
color: '#A4B3C5',
fontSize: 14,
},
tooltip:{
trigger: 'axis'
},
legend: {
data: this.queryZHCLInfoArray,
textStyle: {
......@@ -513,9 +539,14 @@
data: this.queryZHCLInfoDate
},
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