From bd6037ef50a579c9e9e3a133482670f6acb5fe5f Mon Sep 17 00:00:00 2001 From: Stephen Liu <750188453@qq.com> Date: Wed, 13 Jul 2022 16:06:44 +0800 Subject: [PATCH] fix(treemap-v2): color scheme not work when there is only one dimension (#20671) --- .../plugins/plugin-chart-echarts/src/Treemap/transformProps.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts index 5dd7d55467f7..6c98453feefa 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts @@ -240,6 +240,7 @@ export default function transformProps( colorSaturation: COLOR_SATURATION, itemStyle: { borderColor: BORDER_COLOR, + color: colorFn(`${metricLabel}`, sliceId), borderWidth: BORDER_WIDTH, gapWidth: GAP_WIDTH, },