更新8D
This commit is contained in:
@@ -83,7 +83,7 @@ export default {
|
||||
series: [],
|
||||
};
|
||||
this.dataList.forEach((item) => {
|
||||
const i = option.series.findIndex((c) => c.id === item.productTypeId);
|
||||
const i = option.series.findIndex((c) => c.id === (this.eType?item.problemTypeId:item.productTypeId));
|
||||
if (i >= 0) {
|
||||
option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
|
||||
} else {
|
||||
@@ -104,7 +104,6 @@ export default {
|
||||
option.series.push(obj);
|
||||
}
|
||||
})
|
||||
console.log(option.series)
|
||||
this.lineChart = echarts.init(document.getElementById("lineChart"))
|
||||
this.lineChart.setOption(option);
|
||||
window.addEventListener("resize", () => {
|
||||
@@ -117,10 +116,10 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
.mod-demo-echarts {
|
||||
> .el-row {
|
||||
.el-col {
|
||||
}
|
||||
}
|
||||
// > .el-row {
|
||||
// .el-col {
|
||||
// }
|
||||
// }
|
||||
.chart-box {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user