We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c82952b commit 88e541eCopy full SHA for 88e541e
1 file changed
packages/ui/src/components/PERStackedBarChart/index.tsx
@@ -171,10 +171,10 @@ function PERStackedBarChart({
171
datalabels: {
172
display: showDataLabels,
173
color: (context) => {
174
- const backgroundColor = context.dataset.backgroundColor;
+ const { backgroundColor } = context.dataset;
175
// Handle case where backgroundColor is an array
176
- const color = Array.isArray(backgroundColor)
177
- ? backgroundColor[context.dataIndex]
+ const color = Array.isArray(backgroundColor)
+ ? backgroundColor[context.dataIndex]
178
: backgroundColor as string;
179
return getContrastColor(color);
180
},
0 commit comments