# Class XYSeriesTransition

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

All Implemented Interfaces:
  `Animation`

public class XYSeriesTransition extends SeriesTransition
A transition for enabling animations between different values in an XYSeries.

- ## Field Summary

  ### Fields inherited from class SeriesTransition

  `EASING_IN, EASING_IN_OUT, EASING_LINEAR, EASING_OUT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XYSeriesTransition(ChartComponent chart, XYSeries series)`
  Creates a new transition on the given chart and associated series.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `cleanup()`
  Cleans up after the transition is complete.
  `XYSeries`
  `getBuffer()`
  Gets the "buffer" series where values can be set.
  `XYSeries`
  `getSeries()`
  Gets the series whose values are to be animated by this transition.
  `void`
  `initTransition()`
  Initializes the transition.
  `protected void`
  `update(int progress)`
  Updates the series and renderer at the given progress position (0 to 100).

  ### Methods inherited from class SeriesTransition

  `animate, animateChart, getChart, getDuration, getEasing, paint, setChart, setDuration, setEasing, updateChart`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### XYSeriesTransition

    public XYSeriesTransition(ChartComponent chart, XYSeries series)

    Creates a new transition on the given chart and associated series. The series should be one of the series rendered by the given chart.

    ###### Parameters

    - `chart`: The ChartComponent that is being used to render the series.

    - `series`: The series whose data you wish to animate.

- ## Method Details

  - ### initTransition

    public void initTransition()
    Initializes the transition. This can be overridden by subclasses to provide their own functionality to be executed just before the transition occurs.
    Overrides:
      `initTransition` in class `SeriesTransition`

  - ### cleanup

    protected void cleanup()
    Cleans up after the transition is complete.
    Overrides:
      `cleanup` in class `SeriesTransition`

  - ### update

    protected void update(int progress)

    Updates the series and renderer at the given progress position (0 to 100).

    ###### Parameters

    - `progress`: The progress position in the motion. (0-100).
    Specified by:
      `update` in class `SeriesTransition`

  - ### getBuffer

    public XYSeries getBuffer()
    Gets the "buffer" series where values can be set. Any values set on the buffer will be applied to the target series during the course of the transition.

  - ### getSeries

    public XYSeries getSeries()
    Gets the series whose values are to be animated by this transition.