feat: 修改能源流向图

This commit is contained in:
zty 2024-12-27 19:19:14 +08:00
parent 2384a1ea71
commit 89bb16149f
1 changed files with 9 additions and 6 deletions

View File

@ -116,6 +116,7 @@ import * as echarts from 'echarts';
{id:2,name:'年统计'},
],
row_list : ['peak','high','low','deep','flat'],
row_translate: ['峰值', '高峰', '低谷', '深谷', '平谷'],
};
},
@ -149,7 +150,9 @@ import * as echarts from 'echarts';
}
}
},
translate(){
},
dateChange() {
let that = this;
let arr = [],
@ -211,9 +214,9 @@ import * as echarts from 'echarts';
let seriesData = [];
let categories = this.mpoint_name; //
let rowList = this.row_list; // ['peak', 'high', 'low', 'deep', 'flat']
let row_translate = this.row_translate; // ['', '', '', '', '']
// 'peak', 'high', 'low', 'deep', 'flat'
rowList.forEach(level => {
rowList.forEach((level, index) => {
let data = categories.map(device => {
//
let deviceData = chartData[device]?.find(item => item.level === level);
@ -221,7 +224,7 @@ import * as echarts from 'echarts';
});
seriesData.push({
name: level, // peakhigh
name: row_translate[index], // peakhigh
type: 'bar',
data: data, //
label: {
@ -243,7 +246,7 @@ import * as echarts from 'echarts';
axisPointer: { type: 'shadow' } //
},
legend: {
data: rowList, // 'peak', 'high'
data: row_translate, // 'peak', 'high'
top: '10%'
},
xAxis: {
@ -264,7 +267,7 @@ import * as echarts from 'echarts';
//
myChart.setOption(option);
},
},
handlePrint() {
this.$PRINT('#myReport');