Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
UltraDoughnutChart Slice Colors
posted

How do you change the colors of the slices in the UltraDoughnutChart?

Thanks,

Helena

Parents
No Data
Reply
  • 6120
    Offline posted

    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 Kokkalagadda
    Associate Software Developer

Children