🐞 fix: 处理无数据情况,确保图表数据清空
This commit is contained in:
parent
89cdad9212
commit
d90aa880ab
|
@ -80,6 +80,9 @@ export default {
|
|||
const seriesData = res.rows.map((item) => parseFloat(item.ds));
|
||||
this.chartData.Xdata = axisData;
|
||||
this.chartData.Ydata = seriesData;
|
||||
} else {
|
||||
this.chartData.Xdata = [];
|
||||
this.chartData.Ydata = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue