From d0a7f7540e1482cf70baebb86e944e9e2e99c3b6 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Mon, 2 Sep 2024 18:45:19 +0800 Subject: [PATCH] =?UTF-8?q?style(=E5=9B=BE=E8=A1=A8-=E6=BC=8F=E6=96=97?= =?UTF-8?q?=E5=9B=BE):=20=E9=81=87=E5=88=B0=E7=A9=BA=E5=80=BC=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=AE=A1=E7=AE=97=E7=BB=93=E6=9E=9C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A8=AA=E6=9D=A0=20-?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/js/panel/charts/others/funnel.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts index ec14363616..fa3ad36de3 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts @@ -149,11 +149,14 @@ export class Funnel extends G2PlotChartView { fontSize: l.fontSize }, formatter: datum => { + if (!datum['$$conversion$$'][0]) { + return `${conversionTagAtt.text ?? ''} -` + } const rate = ( (datum['$$conversion$$'][1] / datum['$$conversion$$'][0]) * 100 ).toFixed(conversionTagAtt.precision) - return `${conversionTagAtt.text ?? ''}${rate}%` + return `${conversionTagAtt.text ?? ''} ${rate}%` } } }