AbstractSeries QML Type

所有 Qt Graph 系列类型的基础类型。更多

Import Statement: import QtGraphs
In C++: QAbstractSeries
Inherited By:

AreaSeries, BarSeries, PieSeries, and XYSeries

属性

信号

详细说明

该类型不能直接实例化。相反,应使用以下派生类型之一来创建系列:LineSeries,SplineSeries,BarSeries, 或ScatterSeries

属性文档

axisX : AbstractAxis [since 6.10]

用于此序列的 x 轴。在GraphsView 中定义的轴之外创建一个单独的轴,向用户显示每个图形的多个轴。

此属性在 Qt 6.10 中引入。

另请参阅 axisY


axisY : AbstractAxis [since 6.10]

该系列使用的 y 轴。创建与GraphsView 中定义的轴不同的单独轴,向用户显示每个图形的多个轴。

该属性在 Qt 6.10 中引入。

另请参阅 axisX


hoverable : bool

控制是否可以用鼠标/触摸悬停系列。默认情况下,hoverable 设置为false


hovered : bool [read-only]

可用于检查当前鼠标/触摸是否悬停在系列上。

另请参阅 QAbstractSeries::hovered


legendData : list<LegendData> [read-only]

包含为图表中的数据集创建图例标记所需的信息。


name : string

系列名称。该名称将显示在序列的图例中,并支持 HTML 格式。


opacity : real

系列的不透明度。默认情况下,不透明度为 1.0。有效值范围从 0.0(透明)到 1.0(不透明)。


selectable : bool

控制是否可以用鼠标/触摸选择系列。默认情况下,selectable 设置为false


type : enumeration [read-only]

系列类型。

常数描述
AbstractSeries.SeriesType.Line折线图。
AbstractSeries.SeriesType.Bar条形图
AbstractSeries.SeriesType.Scatter散点图
AbstractSeries.SeriesType.Pie饼图
AbstractSeries.SeriesType.Spline曲线图
AbstractSeries.SeriesType.Area面积图

valuesMultiplier : real

该变量可用于动画系列值,使其从 0 缩放至实际值大小。默认情况下,valuesMultiplier 为 1.0。有效值范围从 0.0(高度为 0)到 1.0(满值)。


visible : bool

该系列使用的可见性。默认情况下,visible 设置为true


zValue : int [since 6.10]

GraphsView 的系列列表按 zValue 属性排序。由于每个系列类型都是一次性呈现的,因此排序主要是作为每个系列类型的内部顺序。每个系列类型的最高 zValue 决定系列类型之间的呈现顺序。默认值为 0。

此属性在 Qt 6.10 中引入。


信号文档

hoverableChanged()

当系列hoverable 发生变化时,将发出该信号。

注: 相应的处理程序是onHoverableChanged


hoveredChanged()

hovered 系列发生变化时,将发出该信号。

注: 相应的处理程序是onHoveredChanged


legendDataChanged()

图例数据更改时发出此信号。

注: 相应的处理程序是onLegendDataChanged


nameChanged()

当系列name 发生变化时,将发出此信号。

注: 相应的处理程序是onNameChanged


opacityChanged()

opacity 系列发生变化时,将发出此信号。

注: 相应的处理程序是onOpacityChanged


selectableChanged()

当系列selectable 发生变化时,发出此信号。

注: 相应的处理程序是onSelectableChanged


themeChanged()

当系列主题发生变化时,发出此信号。

注: 相应的处理程序是onThemeChanged


valuesMultiplierChanged()

valuesMultiplier 系列发生变化时,会发出该信号。

注: 相应的处理程序是onValuesMultiplierChanged


visibleChanged()

系列可见性发生变化时,发出此信号。

注: 相应的处理程序是onVisibleChanged


© 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.