GraphTransition QML Type

A container in which all animations are defined. 更多...

import 语句: import QtGraphs

特性

详细描述

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 {}
        }
    }
}
					

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

另请参阅 GraphPointAnimation and SplineControlAnimation .

特性文档编制

TransitionType : enumeration

Type of the transition.

常量 描述
None No transition.
PointAdded A point has been added.
PointReplaced A point has been replaced.
PointRemoved A point has been removed.

animations : list < 对象 >

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