From d6b6adfbc0dcdb5ed587c240bcb0f81c4ba4357f Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 10 Mar 2026 18:20: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=AF=B9=E7=A7=B0=E6=9D=A1=E5=BD=A2=E5=9B=BEnull=E5=80=BC?= =?UTF-8?q?=E6=9C=89=E6=9F=B1=E4=BD=93=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/panel/charts/g2/bar/bidirectional-bar.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bidirectional-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bidirectional-bar.ts index aee7724807..dfb2018754 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bidirectional-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bidirectional-bar.ts @@ -341,12 +341,22 @@ export class BidirectionalHorizontalBar extends G2ChartView { } defaultsDeep(firstMark, { style: { - fill: firstColor + fill: d => { + if (d.value === null || d.value === undefined) { + return 'transparent' + } + return firstColor + } } }) defaultsDeep(secondMark, { style: { - fill: secondColor + fill: d => { + if (d.value === null || d.value === undefined) { + return 'transparent' + } + return secondColor + } } }) return options