From 449bad198318fe6e67bec92b2978de3542bfb3b5 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Thu, 26 Sep 2024 15:04:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E6=97=B6=E9=97=B4=E8=BF=87=E6=BB=A4=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=BE=9D=E7=84=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=9C=80=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#12074?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/js/panel/charts/bar/bar.ts | 1 + .../src/views/chart/components/js/panel/charts/line/area.ts | 1 + .../src/views/chart/components/js/panel/charts/line/line.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts index 17ab2ca800..8bb686b50e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts @@ -97,6 +97,7 @@ export class Bar extends G2PlotChartView { async drawChart(drawOptions: G2PlotDrawOptions): Promise { const { chart, container, action } = drawOptions if (!chart?.data?.data?.length) { + chart.container = container clearExtremum(chart) return } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts index ec8e71b19e..ad002acae1 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts @@ -98,6 +98,7 @@ export class Area extends G2PlotChartView { async drawChart(drawOptions: G2PlotDrawOptions): Promise { const { chart, container, action } = drawOptions if (!chart.data?.data?.length) { + chart.container = container clearExtremum(chart) return } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts index cc601921a3..5432140a63 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts @@ -50,6 +50,7 @@ export class Line extends G2PlotChartView { async drawChart(drawOptions: G2PlotDrawOptions): Promise { const { chart, action, container } = drawOptions if (!chart.data?.data?.length) { + chart.container = container clearExtremum(chart) return }