in src/barChart.ts [209:231]
function getColumnColorByIndex(
category: DataViewCategoryColumn,
index: number,
colorPalette: ISandboxExtendedColorPalette,
): string {
if (colorPalette.isHighContrast) {
return colorPalette.background.value;
}
const defaultColor: Fill = {
solid: {
color: colorPalette.getColor(`${category.values[index]}`).value,
}
};
return getCategoricalObjectValue<Fill>(
category,
index,
'colorSelector',
'fill',
defaultColor
).solid.color;
}