Select to view content in your preferred language

How to customize pie chart slice colors in chart component

83
0
yesterday
LouisaMeyerson
New Contributor

I have a chart component in a mapping app that renders a pie chart based on a feature layer. However, I don't like how the automatic coloring scheme results in adjacent slices sometimes bearing the same color:

LouisaMeyerson_1-1779824490159.png

Is it possible to overwrite the colors of the chart's slices after they're generated? I'm aware of the pie-chart-model's getSliceColor() and setSliceColor() methods but the slices array is undefined whenever I try to access it or use slice-related methods.

 

0 Kudos
0 Replies