# Class XYMultiSeriesTransition

java.lang.Object
com.codename1.charts.transitions.SeriesTransition
com.codename1.charts.transitions.XYMultiSeriesTransition

All Implemented Interfaces:
  `Animation`

public class XYMultiSeriesTransition extends SeriesTransition
A transition to animate the values of a MultipleSeriesDataset (used by BarChart).

- ## Field Summary

  ### Fields inherited from class SeriesTransition

  `EASING_IN, EASING_IN_OUT, EASING_LINEAR, EASING_OUT`
  Modifier and Type
  Field
  Description
  `static final int`
  `EASING_IN`
  `static final int`
  `EASING_IN_OUT`
  `static final int`
  `EASING_LINEAR`
  `static final int`
  `EASING_OUT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XYMultiSeriesTransition(ChartComponent chart, XYMultipleSeriesDataset dataset)`
  Creates a new transition for the given chart and dataset.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `cleanup()`
  Cleans up any settings in the transition.
  `XYMultipleSeriesDataset`
  `getBuffer()`
  Gets the buffer/cache for values.
  `protected void`
  `initTransition()`
  Initializes the transition for another iteration.
  `protected void`
  `update(int progress)`
  Updates the renderer and model at the specified progress position of the animation.

  ### Methods inherited from class SeriesTransition

  `animate, animateChart, getChart, getDuration, getEasing, paint, setChart, setDuration, setEasing, updateChart`
  Modifier and Type
  Method
  Description
  `boolean`
  `animate()`
  Allows the animation to reduce "repaint" calls when it returns false.
  `void`
  `animateChart()`
  Applies all pending changes to the chart model and renderer using the current animation settings.
  `ChartComponent`
  `getChart()`
  Gets the ChartComponent that is the subject of the transition.
  `int`
  `getDuration()`
  Gets the duration of the transition.
  `int`
  `getEasing()`
  Gets the type of easing used in the transition.
  `void`
  `paint(Graphics g)`
  Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.
  `void`
  `setChart(ChartComponent chart)`
  Sets the ChartComponent that is the subject of the transition.
  `void`
  `setDuration(int duration)`
  Sets the duration of the transition in milliseconds.
  `void`
  `setEasing(int easing)`
  Sets the type of easing used in the transition.
  `void`
  `updateChart()`
  Applies all pending changes to the chart model and renderer and repaints the chart.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Constructor Details

  - ### XYMultiSeriesTransition

    public XYMultiSeriesTransition(ChartComponent chart, XYMultipleSeriesDataset dataset)

    Creates a new transition for the given chart and dataset. The dataset must be rendered by the given chart for this to work correctly.

    ###### Parameters

    - `chart`

    - `dataset`

- ## Method Details

  - ### initTransition

    protected void initTransition()
    Initializes the transition for another iteration. This can be overridden by subclasses to provide their own initialization. This method will be called just prior to the transition taking place. IMPORTANT: Subclasses must make sure to call super.initTransition() so that the animation will be initialized properly.
    Overrides:
      `initTransition` in class `SeriesTransition`

  - ### update

    protected void update(int progress)

    Updates the renderer and model at the specified progress position of the animation. Meant to be overridden by subclasses.

    ###### Parameters

    - `progress`: The progress of the animation (between 0 and 100).

    ###### Parameters

    - `progress`
    Specified by:
      `update` in class `SeriesTransition`

  - ### cleanup

    protected void cleanup()
    Cleans up any settings in the transition. Called after a transition is complete. This is meant to be overridden by subclasses.
    Overrides:
      `cleanup` in class `SeriesTransition`

  - ### getBuffer

    public XYMultipleSeriesDataset getBuffer()
    Gets the buffer/cache for values. Values set in the buffer will be applied to the target dataset when the transition takes place.