🐞 fix: 处理无数据情况,确保图表数据清空

This commit is contained in:
LokerL 2024-12-03 17:44:31 +08:00
parent 89cdad9212
commit d90aa880ab
1 changed files with 3 additions and 0 deletions

View File

@ -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 = [];
}
});
}