MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manuel d'utilisateur Page 167

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 184
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 166
Charting 167
In Flex 2, you set the value of the seriesitemRenderer property to a skin class that draws the
ChartItems icon:
<mx:PlotSeries itemRenderer="mx.charts.skins.halo.CrossSkin"/>
In addition, you can no longer use the AssetRenderer to use graphics in your charts. Instead,
you must use a class that implements the IDataObject interface.
Binding
In many cases, you declare a data provider object and bind the chart to that data provider. In
Flex 2, you must add the
[Bindable] metadata tag to the variable declaration, otherwise Flex
does not bind to the data. For example:
<mx:Script>
[Bindable] // Add this in Flex 2
public var expenses:Object = [{ ... }, { ... }, { ... }];
</mx:Script>
<mx:BubbleChart maxRadius="50" dataProvider="{expenses}"
mouseDown events
In Flex 1.5, mouseDown events included hitData structures, even if no data was under the
mouses pointer. In this case, the
hitData property existed, but it was null. This behavior was
a way to check for the existence of a click on a chart control.
In Flex 2,
mouseDown events do not include the hitData structure unless the mouse is
positioned over a data point. Instead, you must use the
mouseDownData event.
alpha
All aspects of charting that used an alpha property to represent transparency, such as Strokes
and Fills, now use 0 to 1 for a range of values rather than 1 to 100. For example:
Flex 1.x:
<mx:SolidColor color="0x7EAEFF" alpha="30"/>
Flex 2:
<mx:SolidColor color="0x7EAEFF" alpha=".3"/>
Vue de la page 166
1 2 ... 162 163 164 165 166 167 168 169 170 171 172 ... 183 184

Commentaires sur ces manuels

Pas de commentaire