Hi,
I am working on C# using Visual Studio 2010 with Infragistics 11.2.
I want to replace the previous XamChart of the type 'Pie' with the new XamPieChart which is available in 11.2.
What I need is to convert the labels of the slices to percentages, Although there was no built in feature in previous versions as well but I had found a work around for this from this post http://forums.infragistics.com/forums/p/59904/306721.aspx#306721
and what in fact I was doing is
private void XamChart1_ChartRendered(object sender, Infragistics.Windows.Chart.ChartRenderedEventArgs e)
{//suppose sum is 1000.
double sum = 1000; foreach (var item in this.XamChart1.Series[0].DataPoints) { Marker marker = new Marker(); if (sum != 0) { double percent = Math.Round((((item.Value) / sum) * 100), 2); marker.Format = percent.ToString() + "%"; } item.Marker = marker; } }
now how can I replace the XamPieChart labels with percentages, because it is different from the XamChart.
I will be very thankful for any kind of help
thanks and regards
Any.
Hello Any,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I added a property of a custom class type which has a Double Property with the same value as the XamPieChart’s Values and I overridden my class ToString method so that I can have a formatted Label. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.