fix: statistics xe result 渲染数据不对问题

This commit is contained in:
orgin 2023-11-20 16:38:02 +08:00
parent aa8dc51b86
commit 38d7bbc917

View File

@ -339,12 +339,17 @@ export default {
const { allDate, allList } = result const { allDate, allList } = result
this.option.xAxis.data = allDate this.option.xAxis.data = allDate
this.option.legend.show = true this.option.legend.show = true
this.option.series = allList.map((item) => { this.option.series = allList.map((item) => {
let newSeries = []
if(item.m_Keys) {
item.m_Keys.forEach((k,i) => {
newSeries.push([k,item.m_Values[i]])
});
}
return { return {
type: 'line', type: 'line',
name: item.m_strGraphName, name: item.m_strGraphName,
data: item.m_Values, data: newSeries,
itemStyle: { itemStyle: {
color: item.m_GraphPen, color: item.m_GraphPen,
}, },