Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual page 166

Migrating applications to flex 2
Table of Contents

Advertisement

Skins
Skins are now called renderers. For example, the CandlestickSkin class is now
CandlestickRenderer.
Renderers
Some functionality for the AxisRenderer was moved to other axis objects.
The
labelFunction
axis type (such as CategoryAxis). The signature for the function is changed as well. Instead of
a single parameter,
the labelFunction()
is as follows:
labelFunction(categoryValue:Object, previousCategoryValue:Object,
axis:axis_type, categoryItem:Object);
For more information on using the
The
property was also moved to the individual axis rather than the axis renderer. For
title
example, in Flex 1.x you defined both the horizontalAxis and the horizontalAxisRenderer, as
the following example shows:
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{expenses}" categoryField="Month"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderer>
<mx:AxisRenderer title="Expenses" labelFunction="defineLabel"/>
</mx:horizontalAxisRenderer>
In Flex 2, you set the
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{expenses}" categoryField="Month"
title="Expenses" labelFunction="defineLabel"/>
</mx:horizontalAxis>
You no longer use renderers to change the appearance of ChartItems. In Flex 1.x, for example,
you could specify a CrossRenderer or TriangleRenderer to draw a ChartItem as a cross or a
triangle:
<mx:PlotSeries>
<mx:renderer>
<mx:CrossRenderer/>
</mx:renderer>
</mx:PlotSeries>
166
Additional Migration Issues
property, which was a property of AxisRenderer, is now a property of the
labelFunction
and
title
labelFunction
function now takes up to four. The new signature
property, see the Flex 2 Developer's Guide.
properties on the horizontalAxis:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents