Forum Discussion

SKYViz's avatar
SKYViz
Frequent Visitor
2 years ago
Solved

How to implement colorPicker in custom visual for updating color of Pie charts slices?

Hello Everyone, I have developed the pie chart custom visual by taking the reference from the PowerBI-visuals-sampleBarChart. Pie chart has been created and default color has been assigned to eac...
  • SKYViz's avatar
    2 years ago

    I have managed to fix the issue:

    const color = colorPalette.getColor(slice).value;
    Replace the above line of code with:
    const color: string = getColumnColorByIndex(categories[0], i, colorPalette);