QColorAxis 类将色标显示为图表轴之一。 更多...
头: | #include <QColorAxis> |
Since: | Qt 6.2 |
继承: | QAbstractAxis |
virtual | ~QColorAxis () |
bool | autoRange () const |
QLinearGradient | gradient () const |
qreal | max () const |
qreal | min () const |
void | setAutoRange (bool autoRange ) |
void | setGradient (const QLinearGradient & gradient ) |
void | setMax (qreal max ) |
void | setMin (qreal min ) |
void | setSize (const qreal size ) |
void | setTickCount (int count ) |
qreal | size () const |
int | tickCount () const |
void | autoRangeChanged (bool autoRange ) |
void | maxChanged (qreal max ) |
void | minChanged (qreal min ) |
void | rangeChanged (qreal min , qreal max ) |
void | sizeChanged (const qreal size ) |
void | tickCountChanged (int tickCount ) |
A color axis can be set up to show a color scale based on the passed gradient. The scale has tick marks with labels based on data passed in QXYSeries::colorby method.
This property holds the property indicating if the range should be set from the list of values passed in QXYSeries::colorBy method or rather taken from the axis itself.
默认值为
true
.
访问函数:
bool | autoRange () const |
void | setAutoRange (bool autoRange ) |
通知程序信号:
void | autoRangeChanged (bool autoRange ) |
此特性保持轴的最大值。
When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid.
访问函数:
qreal | max () const |
void | setMax (qreal max ) |
通知程序信号:
void | maxChanged (qreal max ) |
此特性保持轴的最小值。
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid.
访问函数:
qreal | min () const |
void | setMin (qreal min ) |
通知程序信号:
void | minChanged (qreal min ) |
此特性保持色标的大小。
Depending on the alignment the value indicates either width or height.
访问函数:
qreal | size () const |
void | setSize (const qreal size ) |
通知程序信号:
void | sizeChanged (const qreal size ) |
This property holds the number of tick marks on the axis. This indicates how many grid lines are drawn on the chart if QColorAxis::gridVisible is equal to
true
. The default value is 5, and the number cannot be less than 2.
注意: Grid lines are intentionally invisible by default in QColorAxis as this type of axis does not represent geometric values.
访问函数:
int | tickCount () const |
void | setTickCount (int count ) |
通知程序信号:
void | tickCountChanged (int tickCount ) |
[virtual noexcept]
QColorAxis::
~QColorAxis
()
销毁对象。
[signal]
void
QColorAxis::
autoRangeChanged
(
bool
autoRange
)
This signal is emitted when the auto range mode, specified by autoRange ,改变。
注意: 通知程序信号对于特性 autoRange .
Returns the gradient currently used on the color scale.
注意: If the axis is attached to a series, the gradient is also used by the QXYSeries::colorBy 方法。
另请参阅 setGradient .
[signal]
void
QColorAxis::
maxChanged
(
qreal
max
)
This signal is emitted when the maximum value of the axis, specified by max ,改变。
注意: 通知程序信号对于特性 max .
[signal]
void
QColorAxis::
minChanged
(
qreal
min
)
This signal is emitted when the minimum value of the axis, specified by min ,改变。
注意: 通知程序信号对于特性 min .
[signal]
void
QColorAxis::
rangeChanged
(
qreal
min
,
qreal
max
)
This signal is emitted when the minimum or maximum value of the axis, specified by min and max ,改变。
Sets the gradient on the color scale to gradient .
注意: If the axis is attached to a series, the gradient is also used by the QXYSeries::colorBy 方法。
另请参阅 gradient .
[signal]
void
QColorAxis::
tickCountChanged
(
int
tickCount
)
This signal is emitted when the number of tick marks on the axis, specified by tickCount ,改变。
注意: 通知程序信号对于特性 tickCount .