How do you change the colors of the slices in the UltraDoughnutChart?
Thanks,
Helena
Hello Helena,
There is a possibility of assigning different colors to the slices of UltraDoughnutChart by using the Brushes property off the RingSeries class. The Brushes property defines the palette from which automatically assigned slice brushes are selected. The colors will be applied to the slices in the order the brushes were added. For example, you can do something like this:
BrushCollection bc = new BrushCollection();bc.Add(new SolidColorBrush(Colors.Red));bc.Add(new SolidColorBrush(Colors.Green));bc.Add(new SolidColorBrush(Colors.Blue));bc.Add(new SolidColorBrush(Colors.Pink));bc.Add(new SolidColorBrush(Colors.Brown)); doughnutChart.RingSeries.Brushes = bc;
Please let me know if I may be of further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
Thank you! That worked!
Is there a way to associate the color with a particular slice?