Commit 1834001d by lyy

echarts图表显示值

parent eeaddac3
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<div id="app"> <div id="app">
<el-container> <el-container>
<el-header style="height: 5vh; padding: 0"> <el-header style="height: 5vh; padding: 0">
<div class="home-header-pagemain"> <div class="home-header-pageman">
<el-select v-model="factory" @change="handledataPicker"> <el-select v-model="factory" @change="handledataPicker">
<el-option <el-option
v-for="(item,index) in factoryList" v-for="(item,index) in factoryList"
...@@ -408,8 +408,36 @@ ...@@ -408,8 +408,36 @@
// ] // ]
}, },
xAxis: { type: 'category' }, xAxis: { type: 'category' },
yAxis: {}, yAxis: {
series: [{ type: 'bar',itemStyle: { color: '#0391FF' } }, { type: 'bar' ,itemStyle: { color: '#00EBFF' }}, { type: 'bar',itemStyle: { color: '#05CC26' } }] type: 'value'
},
series: [
{
type: 'bar',
itemStyle: { color: '#0391FF' },
label: {
show: true,
position: 'top'
}
},
{ type: 'bar' ,
itemStyle:
{
color: '#00EBFF'
},
label: {
show: true,
position: 'top'
}
},
{
type: 'bar',
itemStyle: { color: '#05CC26' } ,
label: {
show: true,
position: 'top'
}
}]
} }
}, },
queryBJInfo(){ queryBJInfo(){
...@@ -440,6 +468,12 @@ ...@@ -440,6 +468,12 @@
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 = {
show: true,
position: 'top'
};
});
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)
...@@ -467,7 +501,7 @@ ...@@ -467,7 +501,7 @@
} }
}, },
grid: { grid: {
top: '9%', top: '18%',
bottom: '2%', bottom: '2%',
left: '2%', left: '2%',
right: '2%', right: '2%',
......
...@@ -423,6 +423,10 @@ ...@@ -423,6 +423,10 @@
areaStyle: { areaStyle: {
color: '#245085' color: '#245085'
}, },
label: {
show: true,
position: 'top'
}
} }
] ]
...@@ -507,6 +511,10 @@ ...@@ -507,6 +511,10 @@
areaStyle: { areaStyle: {
color: '#245085' color: '#245085'
}, },
label: {
show: true,
position: 'top'
}
} }
] ]
...@@ -576,6 +584,10 @@ ...@@ -576,6 +584,10 @@
areaStyle: { areaStyle: {
color: '#245085' color: '#245085'
}, },
label: {
show: true,
position: 'top'
}
} }
] ]
...@@ -627,6 +639,10 @@ ...@@ -627,6 +639,10 @@
areaStyle: { areaStyle: {
color: '#245085' color: '#245085'
}, },
label: {
show: true,
position: 'top'
}
} }
] ]
......
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