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}%` } } }