Hi,
I am using InfragisticsWPF4.Controls.Charts.XamDataChart.v12.2 version 12.2.20122.1000.
When i am implementing the pir chart, the color repeatation occurs after 5 or more legends are there.
Can you let me know how can this bs handled or this is a bug in infragistics pie chart.
<
igCharts:ItemLegend Grid.Row="1" Grid.Column="1" Name="lgndComapany" Cursor="Hand" VerticalAlignment="Center" Margin="50,0,0,0"
Width="Auto" HorizontalAlignment="Right" LegendItemMouseLeftButtonUp="LgndComapany_OnLegendItemMouseLeftButtonUp">
</igCharts:ItemLegend>
<igCharts:XamPieChart Grid.Row="1" Grid.Column="0" ItemsSource="{Binding OwnershipCollection}"
LabelMemberPath="CompanyName" OthersCategoryThreshold="0" LabelsPosition="BestFit"
ToolTip="{}{CompanyName}" Legend="{Binding ElementName=lgndComapany}"
Name="pieChrtOwnership" ValueMemberPath="InterestPercent" Height="350" AllowSliceExplosion="True">
<igCharts:XamPieChart.LabelTemplate>
<DataTemplate>
<TextBlock Text="{Binding PercentValue, StringFormat=n}" />
</DataTemplate>
</igCharts:XamPieChart.LabelTemplate>
</igCharts:XamPieChart>
Regards,
Rajiv
Hello Rajiv,
Thank you for your post. I have been looking into it and I can say that this behavior occurs by design and if you want to have more colors, you should define a BrushCollection for the XamPieChart. Here you can see how to do so :
http://es.infragistics.com/community/forums/p/58781/298836.aspx
Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hi Stefan,
As in my charts the legends are dynamic, i.e. i wont be knowing how many legends will be there, so i can't define colors in xaml.
What i want is can the colors be put in dynamically according to the legends.
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Can i implement RGB color (dark only) in xampie chart in wpf.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
The XamPieChart's Brushes property is a BrusheColelction, which is ObservableCollection<Brush> type, so the objects you add can be SolidColorBrushes for which you can define the Color by setting the R ,G, B and A Properties. Please let me know if this helps you or you have further questions on this matter.