AbstractSeries QML Type
所有 Qt Graph 系列类型的基础类型。更多
Import Statement: | import QtGraphs |
In C++: | QAbstractSeries |
Inherited By: | AreaSeries, BarSeries, PieSeries, 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)
信号
- hoverableChanged()
- hoveredChanged()
- legendDataChanged()
- nameChanged()
- opacityChanged()
- selectableChanged()
- themeChanged()
- valuesMultiplierChanged()
- visibleChanged()
详细说明
该类型不能直接实例化。相反,应使用以下派生类型之一来创建系列:LineSeries,SplineSeries,BarSeries, 或ScatterSeries 。
属性文档
axisX : AbstractAxis |
axisY : AbstractAxis |
hoverable : bool |
控制是否可以用鼠标/触摸悬停系列。默认情况下,hoverable 设置为false
。
hovered : bool |
可用于检查当前鼠标/触摸是否悬停在系列上。
另请参阅 QAbstractSeries::hovered 。
legendData : list<LegendData> |
包含为图表中的数据集创建图例标记所需的信息。
name : string |
系列名称。该名称将显示在序列的图例中,并支持 HTML 格式。
opacity : real |
系列的不透明度。默认情况下,不透明度为 1.0。有效值范围从 0.0(透明)到 1.0(不透明)。
selectable : bool |
控制是否可以用鼠标/触摸选择系列。默认情况下,selectable 设置为false
。
type : enumeration |
系列类型。
常数 | 描述 |
---|---|
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 |
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.