O'Reilly logo

Flash® Builder™ 4 and Flex® 4 Bible by David Gassner

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

Chapter 21. Using the Flex Charting Controls

IN THIS CHAPTER

  • Understanding the Flex Charting controls

  • Understanding chart types

  • Declaring charts in MXML

  • Setting chart properties and styles

  • Using pie and financial charts

  • Using bar and column charts

  • Using line and area charts

The Flex charting controls enable to you to represent numeric and statistical data visually in a graphical, interactive format. When presented in its raw form, numeric data can be difficult for users to interpret and grasp. When presented visually, in the form of pie charts, bar charts, and other graphical patterns, the data can be understood much more easily.

Consider the following visual presentations. The application in Figure 21.1 uses the following raw data, stored in an XML file:

<?xml version="1.0";?>
<data>
  <row>
    <fruit>Apples</fruit>
    <sales>34</sales>
  </row>
  <row>
    <fruit>Oranges</fruit>
    <sales>23</sales>
  </row>
  <row>
    <fruit>Pears</fruit>
    <sales>45</sales>
  </row>
</data>

Figure 21.1 shows the data display in a DataGrid and a BarChart control. The DataGrid shows the data in its raw form, while the chart makes the data more understandable to the user.

The data is clearly presented either way, but the graphical chart enables the user to understand its meaning on a more intuitive level. Applications that make extensive use of charting controls are sometimes known as dashboard applications because, like a car's dashboard, they give the user a sense of the data with a quick glance.

The Flex Charting controls are included ...

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