3
votes

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!

1
Could you describes a little more the results which you want to see. The usage of LabelFormat in already a half of the implementation, but you want just to have same labels displayed somewhere and it should be not very important whether you used LabelFormat or for example CustomLabels, the usage of IsValueShownAsLabel, setting Chart1.Series("Default").Points(i).AxisLabel or another technique. If you post for example a code example which you want to modify and post a picture with the expected results then it would be simplified the problem.Oleg
I want to choose if the label shows the Y value or the X value of that data point..if that makes sense.Damien

1 Answers

2
votes

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