Dean
Dean

Reputation: 4604

Microsoft Charts for .Net 4, Pie chart appearance

How can I show in the label both the percentage and the name eg. "winners 32%" and "losers 68%". I currently have just a percentage showing using the following code:

Chart1.Series[0].Label = "#PERCENT{P0}";

Upvotes: 2

Views: 4182

Answers (1)

Dean
Dean

Reputation: 4604

The solution is simply this:

Chart1.Series[0].Label = "#VALX #PERCENT{P0}";

'#VALX' shows the x value and so combining with the '#PERCENT{P0}' generates a label like this "winners 32%" where "winners" is my x value.

Upvotes: 4

Related Questions