Using charts in MX-only applications

An MX-only application is an application that does not use any classes from the spark.swc file in its library path. The main application’s root tag is the MX Application class, and no components from the Spark component set are used.

You can use the Flex charting controls in MX-only applications. However, some charting components such as the BarChart and ColumnChart controls, use Spark components by default. As a result, to use charts in MX-only applications, you must apply the MXCharts.css theme to your application. This convenience theme file replaces the use of the Spark Label classes with the MX Label class for the labelClass style property.

To apply the MXCharts.css theme to your application on the command line, use the theme compiler option, as the following example shows:
mxmlc -theme+=../frameworks/projects/charts/MXCharts.css

In Flash Builder, to apply the MXCharts.css theme, use the Additional Compiler Arguments field on the Flex Compiler properties dialog box.

If you set the compatibility-version compiler option to 4.0.0, Flex applies the MXCharts.css theme by default.