QColorAxis#
The QColorAxis
class displays a color scale as one of the chart’s axes. More…
Synopsis#
Properties#
autoRange
- Property indicating if the range should be set from the list of values passed in QXYSeries::colorBy method or rather taken from the axis itselfmax
- Maximum value on the axismin
- Minimum value on the axissize
- Of the color scaletickCount
- 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
Functions#
def
autoRange
()def
gradient
()def
max
()def
min
()def
setAutoRange
(autoRange)def
setGradient
(gradient)def
setMax
(max)def
setMin
(min)def
setRange
(min, max)def
setSize
(size)def
setTickCount
(count)def
size
()def
tickCount
()
Signals#
def
autoRangeChanged
(autoRange)def
gradientChanged
(gradient)def
maxChanged
(max)def
minChanged
(min)def
rangeChanged
(min, max)def
sizeChanged
(size)def
tickCountChanged
(tickCount)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
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.
- class PySide6.QtCharts.QColorAxis([parent=None])#
- Parameters:
parent –
PySide6.QtCore.QObject
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtCharts.QColorAxis.autoRange: bool#
This property holds The property indicating if the range should be set from the list of values passed in colorBy
method or rather taken from the axis itself..
The default value is true
.
- Access functions:
autoRange
()setAutoRange
(autoRange)Signal
autoRangeChanged
(autoRange)
- property PᅟySide6.QtCharts.QColorAxis.max: float#
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.
- Access functions:
max
()setMax
(max)Signal
maxChanged
(max)
- property PᅟySide6.QtCharts.QColorAxis.min: float#
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.
- Access functions:
min
()setMin
(min)Signal
minChanged
(min)
- property PᅟySide6.QtCharts.QColorAxis.size: float#
This property holds The size of the color scale..
Depending on the alignment the value indicates either width or height.
- Access functions:
size
()setSize
(size)Signal
sizeChanged
(size)
- property PᅟySide6.QtCharts.QColorAxis.tickCount: int#
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..
Note
Grid lines are intentionally invisible by default in QColorAxis
as this type of axis does not represent geometric values.
- Access functions:
tickCount
()setTickCount
(count)Signal
tickCountChanged
(tickCount)
- PySide6.QtCharts.QColorAxis.autoRange()#
- Return type:
bool
See also
Getter of property autoRange
.
- PySide6.QtCharts.QColorAxis.autoRangeChanged(autoRange)#
- Parameters:
autoRange – bool
This signal is emitted when the auto range mode, specified by autoRange
, changes.
Notification signal of property autoRange
.
- PySide6.QtCharts.QColorAxis.gradient()#
- Return type:
Returns the gradient currently used on the color scale.
- PySide6.QtCharts.QColorAxis.gradientChanged(gradient)#
- Parameters:
gradient –
PySide6.QtGui.QLinearGradient
Getter of property max
.
- PySide6.QtCharts.QColorAxis.maxChanged(max)#
- Parameters:
max – float
This signal is emitted when the maximum value of the axis, specified by max
, changes.
Notification signal of property max
.
Getter of property min
.
- PySide6.QtCharts.QColorAxis.minChanged(min)#
- Parameters:
min – float
This signal is emitted when the minimum value of the axis, specified by min
, changes.
Notification signal of property min
.
- PySide6.QtCharts.QColorAxis.rangeChanged(min, max)#
- Parameters:
min – float
max – float
This signal is emitted when the minimum or maximum value of the axis, specified by min
and max
, changes.
- PySide6.QtCharts.QColorAxis.setAutoRange(autoRange)#
- Parameters:
autoRange – bool
See also
Setter of property autoRange
.
- PySide6.QtCharts.QColorAxis.setGradient(gradient)#
- Parameters:
gradient –
PySide6.QtGui.QLinearGradient
Sets the gradient on the color scale to gradient
.
Setter of property max
.
Setter of property min
.
- PySide6.QtCharts.QColorAxis.setRange(min, max)#
- Parameters:
min – float
max – float
Setter of property size
.
- PySide6.QtCharts.QColorAxis.setTickCount(count)#
- Parameters:
count – int
See also
Setter of property tickCount
.
Getter of property size
.
- PySide6.QtCharts.QColorAxis.sizeChanged(size)#
- Parameters:
size – float
Notification signal of property size
.
- PySide6.QtCharts.QColorAxis.tickCount()#
- Return type:
int
See also
Getter of property tickCount
.
- PySide6.QtCharts.QColorAxis.tickCountChanged(tickCount)#
- Parameters:
tickCount – int
This signal is emitted when the number of tick marks on the axis, specified by tickCount
, changes.
Notification signal of property tickCount
.