- Qt 6.8
- Qt Graphs
- QML Types
- QtGraphs
- GraphTransition
- Qt Graphs | Commercial or GPLv3

# GraphTransition QML Type

A container in which all animations are defined. More...

Import Statement: | `import QtGraphs`

- List of all members, including inherited members
- GraphTransition is part of Qt Graphs QML Types for 2D.

## Properties

- TransitionType : enumeration
- animations : list<object>

## Detailed Description

GraphTransition is a container for animations inside on Graphs2D. Define this class inside a graph type to enable animated changes for XYSeries within 2D graphs. To define individual animations, add them inside of the GraphTransition. The individual animations within the same GraphTransition are animated in parallel. If a GraphTransition is found by the graph during a call to a supported function which appends or replaces a point, then the values are interpolated according to the animations that are added.

This example shows how to define a GraphTransition within a graph.

     import QtGraphs

     GraphsView {
         LineSeries {
             GraphTransition {
                 GraphPointAnimation {}
             }
         }

         SplineSeries {
             GraphTransition {
                 SplineControlAnimation {}
             }
         }
     }

Note: GraphTransition requires it to be defined directly inside the graph which needs to be animated. Currently only XYSeries are supported.

See also GraphPointAnimation and SplineControlAnimation.

## Property Documentation

TransitionType : enumeration

Type of the transition.

Constant | Description
--- | ---
`None` | No transition.
`PointAdded` | A point has been added.
`PointReplaced` | A point has been replaced.
`PointRemoved` | A point has been removed.

animations : list<object>

A container for all the animations in the GraphTransition. Currently only supports animations to be added and cleared. By default, the list is empty.