Category color mapping

How can I extract all the segments at once to get the categories and colors? I know that the SelectionChanged event will return the previous and current segments but I need all of them so I can color code a matching table.


3 Replies

VO Vishal Omprasad Syncfusion Team October 9, 2023 01:16 PM UTC

Hi Kevin,

As per the current implementation, the Xamarin.Forms SfSunburstChart control does not support retrieval of data of all the segments when a particular segment is selected. The control will retrieve data of only the selected segment through the SelectionChanged event.

If you have any further questions or require assistance with any other aspect, please don't hesitate to let us know. We are here to help.

Regards,

Vishal O.



KA Kevin Anderson October 9, 2023 05:22 PM UTC

Thank you. 

Given that I am using a custom palette is it possible to predict which color will be used? I assumed that it would just be assigned in the order that the colors were in the palette but it doesn't seem to be the case.


Kevin



VO Vishal Omprasad Syncfusion Team October 10, 2023 09:35 AM UTC

Hi Kevin,

Regarding “is it possible to predict which color will be used and colors are assigned in order”:

As per the current implementation, in the Xamarin.Forms SfSunburstChart control, the Palette (used to represent different categories through colors) will be applied to the chart in the order of their arrangement. This means that the order of categories in the first level and the arrangement of colors in the array of Color objects directly influence the colors assigned to the chart segments. By following this arrangement, we can predict the possible colors applied to each category.

We have prepared an example sample demonstrating the above behavior and attached below.

We hope that this helps you. Please let us know if you need further assistance.

Regards,

Vishal O.


Attachment: SunburstChartDemo_ac04061a.zip

Loader.
Up arrow icon