O'Reilly logo

ActionScript Graphing Cookbook by Peter Backx, Dominic Gélineau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Drawing a pie chart with Flex

In the previous chapter we covered creating a bar chart with Flex. This recipe will expand on that topic and will show you how to create a pie chart using Flex. Pie charts are great for visualizing data that adds up to 100 percent (think about who voted for whom in an election) or to show proportion between different numbers.

Drawing a pie chart with Flex

Getting ready

As in the Drawing a bar chart with Flex recipe in Chapter 3, Creating Bar Charts, you will need to have either Flash Builder installed or Flash Develop with the Flex SDK downloaded.

How to do it...

The following is the code to draw a pie chart:

<?xml version="1.0" encoding="utf-8"?> <s:Application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required