From 6ac1ced6ef4b0c3d94d2f3cd36ef8246bb707653 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 3 Sep 2024 13:20:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=8C=87=E6=A0=87=E5=8F=8A=E7=BB=B4=E5=BA=A6?= =?UTF-8?q?=E5=90=8E=E9=87=8D=E6=96=B0=E6=B7=BB=E5=8A=A0=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=9B=BE=E8=A1=A8=E5=86=85=E5=AE=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/js/panel/charts/line/area.ts | 2 +- .../src/views/chart/components/js/panel/charts/line/line.ts | 2 +- .../views/chart/components/js/panel/charts/line/stock-line.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 15a7b793bd..ec8e71b19e 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 @@ -97,7 +97,7 @@ export class Area extends G2PlotChartView { async drawChart(drawOptions: G2PlotDrawOptions): Promise { const { chart, container, action } = drawOptions - if (!chart.data.data?.length) { + if (!chart.data?.data?.length) { 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 54ebb74e65..737a121a6c 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 @@ -49,7 +49,7 @@ export class Line extends G2PlotChartView { } async drawChart(drawOptions: G2PlotDrawOptions): Promise { const { chart, action, container } = drawOptions - if (!chart.data.data?.length) { + if (!chart.data?.data?.length) { clearExtremum(chart) return } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/stock-line.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/stock-line.ts index 88cb4b982f..60138ebb2c 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/stock-line.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/stock-line.ts @@ -212,7 +212,7 @@ export class StockLine extends G2PlotChartView { async drawChart(drawOptions: G2PlotDrawOptions): Promise { const { chart, action, container } = drawOptions - if (!chart.data.data?.length) { + if (!chart.data?.data?.length) { return } const xAxis = chart.xAxis