CN-193 feat: 修复trafficSummary三个图报错的问题

This commit is contained in:
chenjinsong
2021-09-30 15:30:38 +08:00
parent 7cc59a7f2f
commit a98cfce449

View File

@@ -1062,7 +1062,7 @@ export default {
this.chartOption.series = response.data.result.map(r => {
return {
...seriesTemplate,
name: legendMapping[`${this.entity.ip ? 'ip_' : ''}${r.legend}`] ? legendMapping[`${this.entity.ip ? 'ip_' : ''}${r.legend}`] : lineToSpace(r.legend),
name: legendMapping[`${this.entity && this.entity.ip ? 'ip_' : ''}${r.legend}`] ? legendMapping[`${this.entity && this.entity.ip ? 'ip_' : ''}${r.legend}`] : lineToSpace(r.legend),
data: r.values.map(v => [Number(v[0]) * 1000, Number(v[1]), chartParams.unitType])
}
})