Working with axes

You can add axis titles and labels, format tick marks and the axis line, and rotate axis elements. Each chart, except for a pie chart, has horizontal and vertical axes. Along each axis, Flex draws small markers, called tick marks, with a corresponding label. That label can be a text string or a numeric value.

There are two axis types: category and numeric. A category axis typically defines strings that represent groupings of items in the chart; for example, types of expenses (such as rent, utilities, and insurance) or names of employees. A numeric axis typically defines continuous data such as the amount of an expense or the productivity gains of the employee. These data define the height of a column or width of a pie wedge, for example.

The two axis types share some common properties that you can use to define the appearance of the axis. For example, you can customize the values of the labels on the axis using the labelFunction property of the axis. This property is described in Defining axis labels. You set the title of the axis using the title property as described in Adding axis titles.

The following sections describe the CategoryAxis and NumericAxis classes.

Subtopics

About the CategoryAxis class
About the NumericAxis class
Adding axis titles
Defining axis labels
Rotating axis elements
Setting ranges
Formatting tick marks
Formatting axis lines
Using the minField property

Flex 2.01

Take a survey