fix(图表): 修复移除指标及维度后重新添加无法显示图表内容的问题

This commit is contained in:
jianneng-fit2cloud 2024-09-03 13:20:52 +08:00
parent ec6179318b
commit 6ac1ced6ef
3 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ export class Area extends G2PlotChartView<AreaOptions, G2Area> {
async drawChart(drawOptions: G2PlotDrawOptions<G2Area>): Promise<G2Area> {
const { chart, container, action } = drawOptions
if (!chart.data.data?.length) {
if (!chart.data?.data?.length) {
clearExtremum(chart)
return
}

View File

@ -49,7 +49,7 @@ export class Line extends G2PlotChartView<LineOptions, G2Line> {
}
async drawChart(drawOptions: G2PlotDrawOptions<G2Line>): Promise<G2Line> {
const { chart, action, container } = drawOptions
if (!chart.data.data?.length) {
if (!chart.data?.data?.length) {
clearExtremum(chart)
return
}

View File

@ -212,7 +212,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
async drawChart(drawOptions: G2PlotDrawOptions<Mix>): Promise<Mix> {
const { chart, action, container } = drawOptions
if (!chart.data.data?.length) {
if (!chart.data?.data?.length) {
return
}
const xAxis = chart.xAxis