From 4938174ce6a64d769890a25bc6afc67feb96822d Mon Sep 17 00:00:00 2001 From: JCelento Date: Wed, 27 May 2026 10:40:18 -0300 Subject: [PATCH] fix(chart-echarts): drop white textBorder from Funnel segment labels Funnel segment labels currently apply a 1px white textBorder (introduced in #31590 when label.color moved from theme.colors.grayscale.dark2 to theme.colorText). On light-colored segments the white outline overwhelms the thin dark text, leaving labels nearly illegible. Drop the textBorder so the theme-provided text color stands on its own against the segment fill. --- .../plugin-chart-echarts/src/Funnel/transformProps.ts | 2 -- .../test/Funnel/transformProps.test.ts | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts index 87189c355a39..7c096da49dc9 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts @@ -239,8 +239,6 @@ export default function transformProps( formatter, show: showLabels, color: theme.colorText, - textBorderColor: theme.colorBgBase, - textBorderWidth: 1, }; const legendData = keys.sort((a: string, b: string) => { if (!legendSort) return 0; diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts index b2e36c42bba7..f2215b9ec528 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/test/Funnel/transformProps.test.ts @@ -72,6 +72,15 @@ describe('Funnel transformProps', () => { }), ); }); + + test('does not apply a text border to segment labels', () => { + // A white textBorder washes out the dark text on light-colored segments. + const result = transformProps(chartProps as EchartsFunnelChartProps); + const { label } = (result.echartOptions.series as any)[0]; + expect(label.color).toBe(supersetTheme.colorText); + expect(label.textBorderColor).toBeUndefined(); + expect(label.textBorderWidth).toBeUndefined(); + }); }); describe('formatFunnelLabel', () => {