AbstractSeries QML Type
所有 Qt Graph 系列类型的基础类型。更多
| Import Statement: | import QtGraphs |
| In C++: | QAbstractSeries |
| Inherited By: | AreaSeries, BarSeries, LineSeries, PieSeries, ScatterSeries, SplineSeries, and XYSeries |
- 所有成员的列表,包括继承成员
- AbstractSeries 是Qt Graphs QML Types for 2D 的一部分。
属性
- axisX : AbstractAxis
(since 6.10) - axisY : AbstractAxis
(since 6.10) - hoverable : bool
- hovered : bool
- legendData : list<legendData>
- name : string
- opacity : real
- selectable : bool
- type : enumeration
- valuesMultiplier : real
- visible : bool
- zValue : int
(since 6.10)
信号
- axisXChanged(AbstractAxis newAxis)
(since 6.10) - axisYChanged(AbstractAxis newAxis)
(since 6.10) - hoverableChanged()
- hoveredChanged()
- legendDataChanged()
- nameChanged()
- opacityChanged()
- selectableChanged()
- themeChanged()
- valuesMultiplierChanged()
- visibleChanged()
- zValueChanged(int newDrawOrder)
(since 6.10)
详细说明
该类型不能直接实例化。相反,应使用以下派生类型之一来创建系列: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 | 面积图 |
AbstractSeries.SeriesType.Custom | 自定义图表 |
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 中引入。
信号文档
[since 6.10] axisXChanged(AbstractAxis newAxis)
每当控制中的 X 轴发生变化时,就会发出该信号。newAxis 参数包含新轴。
注: 相应的处理程序是onAxisXChanged 。
此信号在 Qt 6.10 中引入。
[since 6.10] axisYChanged(AbstractAxis newAxis)
每当控制中的 Y 轴发生变化时,就会发出该信号。newAxis 参数包含新坐标轴。
注: 相应的处理程序是onAxisYChanged 。
此信号在 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 。
[since 6.10] zValueChanged(int newDrawOrder)
当系列绘制顺序更改为newDrawOrder 时,将发出此信号。
注意: 相应的处理程序是onZValueChanged 。
此信号在 Qt 6.10 中引入。
© 2026 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.