在本页

AreaSeries QML Type

以面积图显示数据。更多

Import Statement: import QtGraphs
In C++: QAreaSeries
Inherits:

AbstractSeries

属性

信号

详细说明

面积图用于绘制由点组成的面积。点由两个序列定义:upperSerieslowerSeries 。这两个数列之间的区域以图形的形式绘制。如果只定义了upperSeries ,则区域位于图形底部和上部序列之间。

属性文档

borderColor : color

区域的边框颜色。默认值为transparent ,表示边框颜色由主题定义。

borderWidth : real

包围区域的线宽。默认值为-1 ,即边框宽度由主题定义。

color : color

区域的填充颜色。默认值为transparent ,即颜色由主题定义。

注意: 如果gradient 被设置为null 以外的值,这些值将优先于color 。在这种情况下,color 将被忽略。

gradient : ShapeGradient [since 6.11]

该属性定义了填充梯度。默认情况下不启用渐变,值为null 。在这种情况下,填充将基于color 属性。

注意: 此处不能使用渐变类型。建议使用高级子类型,如LinearGradient

注意: 如果设置为null 以外的内容,gradient 将优先于color

此属性在 Qt 6.11 中引入。

lowerSeries : XYSeries

设置区域的下边界。如果为空,则图形底部被视为下边界。

selected : bool

将此区域设为选定区域。默认值为false

selectedBorderColor : color

选中时区域的边框颜色。默认值为transparent ,即所选边框颜色由主题定义。

selectedColor : color

选中时区域的填充颜色。默认值为transparent ,这意味着所选颜色由主题定义。

注意: 如果selectedGradient 设置为null 以外的值,则这些值将优先于selectedColor 。在这种情况下,selectedColor 将被忽略。

selectedGradient : ShapeGradient [since 6.11]

该属性定义了选中时区域的填充梯度。默认情况下不启用渐变,值为null 。在这种情况下,填充将基于selectedColor 属性。

注意: 此处不能使用渐变类型。请使用高级子类型,如LinearGradient

注意: 如果设置为null 以外的内容,selectedGradient 将优先于selectedColor

此属性在 Qt 6.11 中引入。

upperSeries : XYSeries

设置区域的上边界。如果为空,则不会绘制区域。

信号文档

borderColorChanged(color newBorderColor)

当区域边框颜色变为newBorderColor 时发出此信号。

注: 相应的处理程序是onBorderColorChanged

borderWidthChanged()

当区域边框宽度发生变化时会发出该信号。

注: 相应的处理程序是onBorderWidthChanged

clicked(point point)

当用户点击或轻触一个区域图时,就会发出该信号。point 指定事件触发位置。

注: 相应的处理程序是onClicked

colorChanged(color newColor)

color 变更为newColor 时,将发出该信号。

注: 相应的处理程序为onColorChanged

doubleClicked(point point)

当用户双击或双击一个区域图时,就会发出该信号。point 指定事件触发位置。该信号总是发生在clicked 之后。

注: 相应的处理程序是onDoubleClicked

[since 6.11] gradientChanged()

当梯度发生变化时会发出该信号。

注: 相应的处理程序是onGradientChanged

此信号在 Qt 6.11 中引入。

lowerSeriesChanged()

当下数列发生变化时会发出该信号。

注: 相应的处理程序是onLowerSeriesChanged

pressed(point point)

当用户点击或轻触区域图并按住鼠标键或手势时,就会发出该信号。point 指定事件触发位置。

注: 相应的处理程序是onPressed

released(point point)

当用户释放按下的单击或点击时,就会发出该信号。point 指定事件触发位置。

注: 相应的处理程序是onReleased

selectedBorderColorChanged(color newSelectedBorderColor)

当所选区域的边框颜色变为newSelectedBorderColor 时,将发出该信号。

注: 相应的处理程序是onSelectedBorderColorChanged

selectedChanged()

当前区域被选中时会发出该信号。

注: 相应的处理程序是onSelectedChanged

selectedColorChanged(color newSelectedColor)

当所选区域的颜色变为newSelectedColor 时,将发出该信号。

注: 相应的处理程序是onSelectedColorChanged

[since 6.11] selectedGradientChanged()

当所选区域的梯度发生变化时会发出该信号。

注: 相应的处理程序是onSelectedGradientChanged

此信号在 Qt 6.11 中引入。

upperSeriesChanged()

当上层序列发生变化时,将发出该信号。

注: 相应的处理程序是onUpperSeriesChanged

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