GraphPointAnimation QML Type

表示点的动画类型。更多

Import Statement: import QtGraphs
Inherits:

XYSeriesAnimation

属性

详细说明

GraphPointAnimation 是一种从QVariantAnimation 派生的动画类型,它定义了点的动画方式。它可以使用QVariantAnimation 功能和属性来制作动画,如durationeasing 。这些动画位于QParallelAnimationGroup 中,因此将并行运行。

本示例展示了如何使用 GraphPointAnimation 设置点动画,duration 为 1000ms,easing 为 OutCubic:

import QtGraphs

GraphsView {
    LineSeries {
        GraphTransition {
            GraphPointAnimation { duration: 1000; easingCurve.type: Easing.OutCubic  }
        }
    }
}

对于XYSeries 来说,这被认为是系列内定义的主要点列表。点将从起始值到结束值进行线性插值。

注: GraphPointAnimation 目前仅支持在添加或删除点时为系列中的最后一个点制作动画。如果点被替换,无论该点在系列中的索引是多少,都将触发动画。

另请参阅 GraphTransitionSplineControlAnimation

属性文档

AnimationState : enumeration

动画状态。

常数说明
Playing动画正在播放。
Stopped动画停止。

GraphAnimationType : enumeration

动画类型。

常量说明
GraphPointGraphPointAnimation 动画。
ControlPointControlPointAnimation 动画。

animating : GraphAnimation::AnimationState

保持动画状态。GraphAnimation::AnimationState 中的一个。


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.