We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b544d62 commit 381305bCopy full SHA for 381305b
packages/chart/src/CdcChartComponent.tsx
@@ -330,7 +330,9 @@ const CdcChart: React.FC<CdcChartProps> = ({
330
newConfig.runtime.originalXAxis = newConfig.xAxis
331
332
if (newConfig.visualizationType === 'Pie') {
333
- newConfig.runtime.seriesKeys = (dataOverride || data).map(d => d[newConfig.xAxis.dataKey])
+ // Use the same data that will be passed to PieChart (after exclusions and filters)
334
+ const pieData = currentData.length > 0 ? currentData : newExcludedData
335
+ newConfig.runtime.seriesKeys = _.uniq(pieData.map(d => d[newConfig.xAxis.dataKey]))
336
newConfig.runtime.seriesLabelsAll = newConfig.runtime.seriesKeys
337
} else {
338
const finalData = dataOverride || newConfig.formattedData || newConfig.data
0 commit comments