MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manuale Utente Pagina 167

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 184
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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"/>
Vedere la pagina 166
1 2 ... 162 163 164 165 166 167 168 169 170 171 172 ... 183 184

Commenti su questo manuale

Nessun commento