I'm instantiating multiple XamPieCharts with identical data, and different colors get assigned seemingly at random. How do I specify that I want a certain value pair assigned to a certain brush in the Brushes collection? I really need to control the colors ....
Casey
Hi Matt,
How do i put brushes dynamically through my viewmodel.
Regards,
Rajiv
HI
Please let me know if you need further assistance regarding this thread.
Sincerely, Matt Developer Support Engineer
HI Casey,
You can define the colors of the slices in the Brushes collection.
Here is a code snippet
<ig:XamPieChart Name="pieChart" Grid.Row="2" ItemsSource="{Binding PieData }" LabelMemberPath="Label" ValueMemberPath="Value" ToolTip="{}{Label}" Legend="{Binding ElementName=Legend}"> <ig:XamPieChart.Brushes> <ig:BrushCollection> <SolidColorBrush>Red</SolidColorBrush> <SolidColorBrush>Yellow</SolidColorBrush> <SolidColorBrush>blue</SolidColorBrush> <SolidColorBrush>Green</SolidColorBrush> <SolidColorBrush>Orange</SolidColorBrush> <SolidColorBrush>Violet</SolidColorBrush> </ig:BrushCollection> </ig:XamPieChart.Brushe