QValueAxis Class▲
-
Header: QValueAxis
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
-
qmake: QT += graphs
-
Inherited By:
-
Instantiated By: qml-qtgraphs-valueaxis.xml
-
Inherits: QAbstractAxis
-
Group: QValueAxis is part of Qt Graphs C++ Classes for 2D
Detailed Description▲
A value axis can be set up to show an axis line with tick marks, grid lines, and shades. The values on the axis are drawn at the positions of tick marks.
Property Documentation▲
labelDecimals : int▲
This property holds the number of decimals used for showing the labels. When set to -1, decimal amount is adjusted automatically based on the values range. The default value is -1.
Access functions:
-
int labelDecimals() const
-
void setLabelDecimals(int decimals)
Notifier signal:
-
void labelDecimalsChanged(int decimals)
labelFormat : QString▲
This property holds the label format of the axis.
The format string supports the following conversion specifiers, length modifiers, and flags provided by printf() in the standard C++ library: d, i, o, x, X, f, F, e, E, g, G, c.
The default value is empty, in which case 'f' format is used.
Access functions:
-
labelFormat() const
-
void setLabelFormat(const &format)
Notifier signal:
-
void labelFormatChanged(const &format)
See Also▲
See also QString::asprintf()
max : qreal▲
This property holds the maximum value on the axis.
When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid. The default value is 10.0
Access functions:
-
max() const
-
void setMax( max)
Notifier signal:
-
void maxChanged( max)
min : qreal▲
This property holds the minimum value on the axis.
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid. The default value is 0.0
Access functions:
-
min() const
-
void setMin( min)
Notifier signal:
-
void minChanged( min)
minorTickCount : int▲
This property holds the number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the graph. Labels are not drawn for minor ticks. The default value is 0.
Access functions:
-
int minorTickCount() const
-
void setMinorTickCount(int count)
Notifier signal:
-
void minorTickCountChanged(int minorTickCount)
tickAnchor : qreal▲
This property holds the base value where the dynamically placed tick marks and labels are started from. The default value is 0.
Access functions:
-
tickAnchor() const
-
void setTickAnchor( anchor)
Notifier signal:
-
void tickAnchorChanged( tickAnchor)
tickInterval : qreal▲
This property holds the interval between dynamically placed tick marks and labels. The default value is 0, which means that intervals are automatically calculated based on the min and max range.
Access functions:
-
tickInterval() const
-
void setTickInterval( insterval)
Notifier signal:
-
void tickIntervalChanged( tickInterval)
Member Function Documentation▲
[explicit] QValueAxis::QValueAxis(QObject *parent = nullptr)▲
Constructs an axis object that is a child of parent.
[virtual] QValueAxis::~QValueAxis()▲
Destroys the object.
void QValueAxis::labelDecimalsChanged(int decimals)▲
This signal is emitted when the decimals amount of axis labels changes.
Notifier signal for property labelDecimals.
void QValueAxis::labelFormatChanged(const QString &format)▲
This signal is emitted when the format of axis labels changes.
Notifier signal for property labelFormat.
void QValueAxis::maxChanged(qreal max)▲
This signal is emitted when the maximum value of the axis, specified by max, changes.
Notifier signal for property max.
void QValueAxis::minChanged(qreal min)▲
This signal is emitted when the minimum value of the axis, specified by min, changes.
Notifier signal for property min.
void QValueAxis::minorTickCountChanged(int minorTickCount)▲
This signal is emitted when the number of minor tick marks on the axis, specified by minorTickCount, changes.
Notifier signal for property minorTickCount.
void QValueAxis::rangeChanged(qreal min, qreal max)▲
This signal is emitted when the minimum or maximum value of the axis, specified by min and max, changes.
void QValueAxis::setRange(qreal min, qreal max)▲
Sets the range from min to max on the axis. If min is greater than max, this function returns without making any changes.
void QValueAxis::tickAnchorChanged(qreal tickAnchor)▲
This signal is emitted when the tick anchoring value, specified by tickAnchor, changes.
Notifier signal for property tickAnchor.
void QValueAxis::tickIntervalChanged(qreal tickInterval)▲
This signal is emitted when the tick interval value, specified by tickInterval, changes.
Notifier signal for property tickInterval.
[override virtual] QAbstractAxis::AxisType QValueAxis::type() const▲
Reimplements: QAbstractAxis::type() const.
Returns the type of the axis.