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
615
Assign specific brush to specific series
posted

I have a pie chart with 3 series; Series 'Dwell', Series 'Pause' and Series 'Remaining'. They are colored sequentially Green, Blue  and Gray, according to the BrushCollection called ChartBrushes in IG.xamDataChart.xaml. The chart looks like this:

pie chart 1

When Series 'Pause' has no data, then it doesn't show and Series 'Remaining' takes the second color, blue in this case. It looks like this:

pie chart 2

I need Series 'Remaining' to always use the gray brush. Likewise, I need Series 'Dwell' to always be green, and Series 'Pause' to always be blue. how can I accomplish this?

Parents
  • 30945
    Suggested Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into the behavior that you have described  and it seems to be caused by the fact that the brushes form the XamPieChart’s Brushes collection are associated with the visible slices by the index of the brushes in the collection. In order to achieve the functionality that you are looking for, I can suggest manipulating the Brushes collection of the XamPieChart , when the values of you data changes. I have created a sample application for you, that demonstrates how you can implement the approach I have mentioned.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    PieChart_BrushesManipilation.zip
Reply Children
No Data