fix sankey theme

This commit is contained in:
Maxime Beauchemin
2025-03-18 17:39:21 -07:00
parent 7dbe05f6d8
commit f16600ee86

View File

@@ -26,6 +26,7 @@ import {
getMetricLabel,
getNumberFormatter,
tooltipHtml,
themeObject,
} from '@superset-ui/core';
import { SankeyChartProps, SankeyTransformedProps } from './types';
import { Refs } from '../types';
@@ -62,6 +63,7 @@ export default function transformProps(
value,
});
});
const { theme } = themeObject;
const seriesData: NonNullable<SankeySeriesOption['data']> = Array.from(
set,
@@ -70,6 +72,10 @@ export default function transformProps(
itemStyle: {
color: colorFn(name, sliceId),
},
label: {
color: theme.colorText,
textShadow: theme.colorBgBase,
},
}));
// stores a map with the total values for each node considering the links