Use a labelFunction in the PieSeries. In the function, use the percentValue parameter (Flex calculates the actual % for you). There's a working example of exactly this in the Charting chapter under the heading Pie Charts > Using Labels.
 
Snippet:
 
function display(data, field, index, percentValue) {
   return data.Expense + percentValue + "%";
}
...
<mx:PieSeries labelPosition="callout" field="Amount" labelFunction="display" />
 
 
hth,
 
matt h
 


From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 10, 2005 4:52 PM
To: [email protected]
Subject: [flexcoders] pie chart percentages

What's the easiest way to display values in a pie chart as percentages
rather than as absolute numbers?

- Tom
Streamline Studios





Reply via email to