QAreaSeries Class
The QAreaSeries class presents data in area graphs. More...
Header: | #include <QAreaSeries> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
qmake: | QT += graphs |
In QML: | AreaSeries |
Inherits: | QAbstractSeries |
- List of all members, including inherited members
- QAreaSeries is part of Qt Graphs C++ Classes for 2D.
Properties
|
|
Public Functions
QColor | borderColor() const |
qreal | borderWidth() const |
QColor | color() const |
QQuickShapeGradient * | gradient() const |
bool | isSelected() const |
QXYSeries * | lowerSeries() const |
QColor | selectedBorderColor() const |
QColor | selectedColor() const |
QQuickShapeGradient * | selectedGradient() const |
void | setBorderColor(QColor newBorderColor) |
void | setBorderWidth(qreal newBorderWidth) |
void | setColor(QColor newColor) |
void | setGradient(QQuickShapeGradient *newGradient) |
void | setLowerSeries(QXYSeries *newLowerSeries) |
void | setSelected(bool newSelected) |
void | setSelectedBorderColor(QColor newSelectedBorderColor) |
void | setSelectedColor(QColor newColor) |
void | setSelectedGradient(QQuickShapeGradient *newSelectedGradient) |
void | setUpperSeries(QXYSeries *newUpperSeries) |
QXYSeries * | upperSeries() const |
Reimplemented Public Functions
virtual QAbstractSeries::SeriesType | type() const override |
Signals
void | borderColorChanged(QColor newBorderColor) |
void | borderWidthChanged() |
void | colorChanged(QColor newColor) |
void | gradientChanged(QQuickShapeGradient *) |
void | lowerSeriesChanged() |
void | selectedBorderColorChanged(QColor newSelectedBorderColor) |
void | selectedChanged() |
void | selectedColorChanged(QColor newSelectedColor) |
void | selectedGradientChanged(QQuickShapeGradient *) |
void | upperSeriesChanged() |
Detailed Description
An area graph is used to draw an area composed by points. The points are defined by two series: upperSeries and lowerSeries. The area between the series is drawn as a graph. If only the upperSeries is defined, the area is then between the bottom of the graph and the upper series.
Property Documentation
borderColor : QColor
This property holds the border color of the area. The default value is Qt::transparent
, meaning the border color is defined by the theme.
Access functions:
QColor | borderColor() const |
void | setBorderColor(QColor newBorderColor) |
Notifier signal:
void | borderColorChanged(QColor newBorderColor) |
borderWidth : qreal
This property holds the width of the line that encloses the area. The default value is -1
, meaning the border width is defined by the theme.
Access functions:
qreal | borderWidth() const |
void | setBorderWidth(qreal newBorderWidth) |
Notifier signal:
void | borderWidthChanged() |
color : QColor
This property holds the fill color of the area. The default value is Qt::transparent
, meaning the color is defined by the theme.
Note: If gradient is set to something other than null
, these will take precedence over color
. The color
will be ignored in this case.
Access functions:
QColor | color() const |
void | setColor(QColor newColor) |
Notifier signal:
void | colorChanged(QColor newColor) |
[since 6.11]
gradient : QQuickShapeGradient*
This property defines the fill gradient. By default no gradient is enabled and the value is null
. In this case the fill will be based on the color property.
Note: The Gradient type cannot be used here. Rather, prefer using one of the advanced subtypes, like LinearGradient.
Note: If set to something other than null
, the gradient
will take precedence over color.
This property was introduced in Qt 6.11.
Access functions:
QQuickShapeGradient * | gradient() const |
void | setGradient(QQuickShapeGradient *newGradient) |
Notifier signal:
void | gradientChanged(QQuickShapeGradient *) |
lowerSeries : QXYSeries*
Sets the lower boundary of the area. If this is null, the graph bottom is considered the lower bound.
Access functions:
QXYSeries * | lowerSeries() const |
void | setLowerSeries(QXYSeries *newLowerSeries) |
Notifier signal:
void | lowerSeriesChanged() |
selected : bool
Sets this area as selected. The default value is false
.
Access functions:
bool | isSelected() const |
void | setSelected(bool newSelected) |
Notifier signal:
void | selectedChanged() |
selectedBorderColor : QColor
This property holds the border color of the area when selected. The default value is Qt::transparent
, meaning the selected border color is defined by the theme.
Access functions:
QColor | selectedBorderColor() const |
void | setSelectedBorderColor(QColor newSelectedBorderColor) |
Notifier signal:
void | selectedBorderColorChanged(QColor newSelectedBorderColor) |
selectedColor : QColor
This property holds the fill color of the area when selected. The default value is Qt::transparent
, meaning the selected color is defined by the theme.
Note: If selectedGradient is set to something other than null
, these will take precedence over selectedColor
. The selectedColor
will be ignored in this case.
Access functions:
QColor | selectedColor() const |
void | setSelectedColor(QColor newColor) |
Notifier signal:
void | selectedColorChanged(QColor newSelectedColor) |
[since 6.11]
selectedGradient : QQuickShapeGradient*
This property defines the fill gradient of the area when selected. By default no gradient is enabled and the value is null
. In this case the fill will be based on the selectedColor property.
Note: The Gradient type cannot be used here. Rather, prefer using one of the advanced subtypes, like LinearGradient.
Note: If set to something other than null
, the selectedGradient
will take precedence over selectedColor.
This property was introduced in Qt 6.11.
Access functions:
QQuickShapeGradient * | selectedGradient() const |
void | setSelectedGradient(QQuickShapeGradient *newSelectedGradient) |
Notifier signal:
void | selectedGradientChanged(QQuickShapeGradient *) |
upperSeries : QXYSeries*
Sets the upper boundary of the area. No area is drawn if this is null.
Access functions:
QXYSeries * | upperSeries() const |
void | setUpperSeries(QXYSeries *newUpperSeries) |
Notifier signal:
void | upperSeriesChanged() |
© 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.