.Net Charting Controls - Change Label Format/Value

Damien picture Damien · Oct 6, 2010 · Viewed 10.4k times · Source

I am attempting to have a Pie chart using the ASP.Net Charting controls. Everything's fine. The X value is the name of a specific item with the Y value the amount. The Legend is displaying the X value, the size of the slices of the pie are correspond to the Y value. All is well.

However I also have the value, as a label, attached to the chart and I would like it to display the Y value instead. How can I do this? I have tried the following:

 series.AxisLabel = "#VALY";
 series.LabelFormat = "#VALY";
 series.Label = "#VALY";

Any advice?

Thanks!

Answer

halfevil picture halfevil · Oct 13, 2010

This should have a solution for your issue. 'Use case' 1 and 2 may assist with this.

http://blogs.msdn.com/b/alexgor/archive/2008/11/11/microsoft-chart-control-how-to-using-keywords.aspx