Adobe Flex 3 Help

Using charting effect triggers

Charts have two unique effect triggers: hideDataEffect and showDataEffect. You set these triggers on the data series for the chart. Whenever the data for a chart changes, Flex executes these triggers in succession on the chart's data. The chart control's other elements, such as gridlines, axis lines, and labels are not affected by the effect.

The hideDataEffect trigger defines the effect that Flex uses as it hides the current data from view. The showDataEffect trigger defines the effect that Flex uses as it moves the current data into its final position on the screen.

Because Flex triggers the effects associated with hideDataEffect and showDataEffect when the data changes, there is "old" data and "new" data. The effect associated with the hideDataEffect trigger is the "old" data that will be replaced by the new data.

The order of events is:

  1. Flex first uses the hideDataEffect trigger to invoke the effect set for each element of a chart that is about to change. These triggers execute at the same time.
  2. Flex then updates the chart with its new data. Any elements (including the grid lines and axes) that do not have effects associated with them are updated immediately with their new values.
  3. Flex then invokes the effect set with the showDataEffect trigger for each element associated with them. Flex animates the new data in the chart.