3

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!

Damien
  • 13,927
  • 14
  • 55
  • 88
  • 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 Oct 10 '10 at 23:25
  • I want to choose if the label shows the Y value or the X value of that data point..if that makes sense. – Damien Oct 12 '10 at 10:11

1 Answers1

2

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

halfevil
  • 550
  • 2
  • 3
  • Please either restate or quote verbatim (using `>` and citation) the source. See [“How to reference material written by others”](https://stackoverflow.com/help/referencing) and [“How do I write a good answer?”](https://stackoverflow.com/help/how-to-answer). – binki Feb 27 '18 at 20:52