From 9298dd74eec9639b859e86300102b97bc9445f1c Mon Sep 17 00:00:00 2001 From: ulleo Date: Thu, 4 Jul 2024 16:04:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=8E=92=E5=BA=8F=E5=9B=BE=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/components/canvas/utils/utils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/components/canvas/utils/utils.js b/core/frontend/src/components/canvas/utils/utils.js index b095245901..9b5711cb55 100644 --- a/core/frontend/src/components/canvas/utils/utils.js +++ b/core/frontend/src/components/canvas/utils/utils.js @@ -469,7 +469,10 @@ export function getCacheTree(treeName) { } export function exportExcelDownload(chart, snapshot, width, height, loadingWrapper, downloadParams, callBack) { - if ((chart.render === 'echarts' || ['text', 'label'].includes(chart.type)) && !(chart.data?.series?.length && chart.data?.series[0].data?.length)) { + if (chart.type === 'race-bar' && !chart.data?.data?.length) { + callBack() + return + } else if ((chart.render === 'echarts' && chart.type !== 'race-bar' || ['text', 'label'].includes(chart.type)) && !(chart.data?.series?.length && chart.data?.series[0].data?.length)) { callBack() return } else if ((chart.render === 'antv' && !['text', 'label', 'flow-map'].includes(chart.type)) && !chart.data?.data?.length) {