QAbstractAxis¶
The QAbstractAxis
class is a base class used for specialized axis classes. More…
Inherited by: QValueAxis, QCategoryAxis, QLogValueAxis, QDateTimeAxis, QBarCategoryAxis
Synopsis¶
Functions¶
def
alignment
()def
gridLineColor
()def
gridLinePen
()def
hide
()def
isGridLineVisible
()def
isLineVisible
()def
isMinorGridLineVisible
()def
isReverse
()def
isTitleVisible
()def
isVisible
()def
labelsAngle
()def
labelsBrush
()def
labelsColor
()def
labelsEditable
()def
labelsFont
()def
labelsTruncated
()def
labelsVisible
()def
linePen
()def
linePenColor
()def
minorGridLineColor
()def
minorGridLinePen
()def
orientation
()def
setGridLineColor
(color)def
setGridLinePen
(pen)def
setGridLineVisible
([visible=true])def
setLabelsAngle
(angle)def
setLabelsBrush
(brush)def
setLabelsColor
(color)def
setLabelsEditable
([editable=true])def
setLabelsFont
(font)def
setLabelsVisible
([visible=true])def
setLinePen
(pen)def
setLinePenColor
(color)def
setLineVisible
([visible=true])def
setMax
(max)def
setMin
(min)def
setMinorGridLineColor
(color)def
setMinorGridLinePen
(pen)def
setMinorGridLineVisible
([visible=true])def
setRange
(min, max)def
setReverse
([reverse=true])def
setShadesBorderColor
(color)def
setShadesBrush
(brush)def
setShadesColor
(color)def
setShadesPen
(pen)def
setShadesVisible
([visible=true])def
setTitleBrush
(brush)def
setTitleFont
(font)def
setTitleText
(title)def
setTitleVisible
([visible=true])def
setTruncateLabels
([truncateLabels=true])def
setVisible
([visible=true])def
shadesBorderColor
()def
shadesBrush
()def
shadesColor
()def
shadesPen
()def
shadesVisible
()def
show
()def
titleBrush
()def
titleFont
()def
titleText
()def
truncateLabels
()
Virtual functions¶
def
type
()
Signals¶
def
colorChanged
(color)def
gridLineColorChanged
(color)def
gridLinePenChanged
(pen)def
gridVisibleChanged
(visible)def
labelsAngleChanged
(angle)def
labelsBrushChanged
(brush)def
labelsColorChanged
(color)def
labelsEditableChanged
(editable)def
labelsFontChanged
(pen)def
labelsTruncatedChanged
(labelsTruncated)def
labelsVisibleChanged
(visible)def
linePenChanged
(pen)def
lineVisibleChanged
(visible)def
minorGridLineColorChanged
(color)def
minorGridLinePenChanged
(pen)def
minorGridVisibleChanged
(visible)def
reverseChanged
(reverse)def
shadesBorderColorChanged
(color)def
shadesBrushChanged
(brush)def
shadesColorChanged
(color)def
shadesPenChanged
(pen)def
shadesVisibleChanged
(visible)def
titleBrushChanged
(brush)def
titleFontChanged
(font)def
titleTextChanged
(title)def
titleVisibleChanged
(visible)def
truncateLabelsChanged
(truncateLabels)def
visibleChanged
(visible)
Detailed Description¶
Each series can be bound to one or more horizontal and vertical axes, but mixing axis types that would result in different domains is not supported, such as specifying QValueAxis
and QLogValueAxis
on the same orientation.
The properties and visibility of various axis elements, such as axis line, title, labels, grid lines, and shades, can be individually controlled.
- class PySide6.QtCharts.QAbstractAxis¶
- PySide6.QtCharts.QAbstractAxis.AxisType¶
This enum type specifies the type of the axis object.
Constant
Description
QAbstractAxis.AxisTypeNoAxis
QAbstractAxis.AxisTypeValue
QAbstractAxis.AxisTypeBarCategory
QAbstractAxis.AxisTypeCategory
QAbstractAxis.AxisTypeDateTime
QAbstractAxis.AxisTypeLogValue
QAbstractAxis.AxisTypeColor
- PySide6.QtCharts.QAbstractAxis.alignment()¶
- Return type
Alignment
This property holds The alignment of the axis..
Can be AlignLeft
, AlignRight
, AlignBottom
, or AlignTop
.
- PySide6.QtCharts.QAbstractAxis.colorChanged(color)¶
- Parameters
color –
PySide6.QtGui.QColor
- PySide6.QtCharts.QAbstractAxis.gridLineColor()¶
- Return type
This property holds The color of the grid line..
- PySide6.QtCharts.QAbstractAxis.gridLineColorChanged(color)¶
- Parameters
color –
PySide6.QtGui.QColor
- PySide6.QtCharts.QAbstractAxis.gridLinePen()¶
- Return type
This property holds The pen used to draw the grid line..
- PySide6.QtCharts.QAbstractAxis.gridLinePenChanged(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
- PySide6.QtCharts.QAbstractAxis.gridVisibleChanged(visible)¶
- Parameters
visible – bool
- PySide6.QtCharts.QAbstractAxis.hide()¶
Makes the axis, shades, labels, and grid lines invisible.
- PySide6.QtCharts.QAbstractAxis.isGridLineVisible()¶
- Return type
bool
This property holds The visibility of the grid lines..
- PySide6.QtCharts.QAbstractAxis.isLineVisible()¶
- Return type
bool
This property holds The visibility of the axis line..
- PySide6.QtCharts.QAbstractAxis.isMinorGridLineVisible()¶
- Return type
bool
This property holds The visibility of the minor grid lines..
Applies only to axes that support minor grid lines.
- PySide6.QtCharts.QAbstractAxis.isReverse()¶
- Return type
bool
This property holds Whether a reverse axis is used..
By default, the value is false
.
The reverse axis is supported with a line, spline, and scatter series, as well as an area series with a cartesian chart. All axes of the same orientation attached to the same series must be reversed if one is reversed or the behavior is undefined.
- PySide6.QtCharts.QAbstractAxis.isTitleVisible()¶
- Return type
bool
This property holds The visibility of the axis title..
By default, the value is true
.
- PySide6.QtCharts.QAbstractAxis.isVisible()¶
- Return type
bool
This property holds The visibility of the axis..
- PySide6.QtCharts.QAbstractAxis.labelsAngle()¶
- Return type
int
This property holds The angle of the axis labels in degrees..
- PySide6.QtCharts.QAbstractAxis.labelsAngleChanged(angle)¶
- Parameters
angle – int
- PySide6.QtCharts.QAbstractAxis.labelsBrush()¶
- Return type
This property holds The brush used to draw the labels..
Only the color of the brush is relevant.
- PySide6.QtCharts.QAbstractAxis.labelsBrushChanged(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
- PySide6.QtCharts.QAbstractAxis.labelsColor()¶
- Return type
This property holds The color of the axis labels..
- PySide6.QtCharts.QAbstractAxis.labelsColorChanged(color)¶
- Parameters
color –
PySide6.QtGui.QColor
- PySide6.QtCharts.QAbstractAxis.labelsEditable()¶
- Return type
bool
Returns true
if axis labels are editable.
See also
- PySide6.QtCharts.QAbstractAxis.labelsEditableChanged(editable)¶
- Parameters
editable – bool
- PySide6.QtCharts.QAbstractAxis.labelsFont()¶
- Return type
This property holds The font of the axis labels..
- PySide6.QtCharts.QAbstractAxis.labelsFontChanged(pen)¶
- Parameters
pen –
PySide6.QtGui.QFont
- PySide6.QtCharts.QAbstractAxis.labelsTruncated()¶
- Return type
bool
This property holds Returns true
if at least one label on the axis is truncated..
Returned value will not be accurate before the axis is shown.
- PySide6.QtCharts.QAbstractAxis.labelsTruncatedChanged(labelsTruncated)¶
- Parameters
labelsTruncated – bool
- PySide6.QtCharts.QAbstractAxis.labelsVisible()¶
- Return type
bool
This property holds Whether axis labels are visible..
- PySide6.QtCharts.QAbstractAxis.labelsVisibleChanged(visible)¶
- Parameters
visible – bool
- PySide6.QtCharts.QAbstractAxis.linePen()¶
- Return type
This property holds The pen used to draw the line..
- PySide6.QtCharts.QAbstractAxis.linePenChanged(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
- PySide6.QtCharts.QAbstractAxis.linePenColor()¶
- Return type
This property holds The color of the axis and tick marks..
- PySide6.QtCharts.QAbstractAxis.lineVisibleChanged(visible)¶
- Parameters
visible – bool
- PySide6.QtCharts.QAbstractAxis.minorGridLineColor()¶
- Return type
This property holds The color of the minor grid line..
Applies only to axes that support minor grid lines.
- PySide6.QtCharts.QAbstractAxis.minorGridLineColorChanged(color)¶
- Parameters
color –
PySide6.QtGui.QColor
- PySide6.QtCharts.QAbstractAxis.minorGridLinePen()¶
- Return type
This property holds The pen used to draw the minor grid line..
Applies only to axes that support minor grid lines.
- PySide6.QtCharts.QAbstractAxis.minorGridLinePenChanged(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
- PySide6.QtCharts.QAbstractAxis.minorGridVisibleChanged(visible)¶
- Parameters
visible – bool
- PySide6.QtCharts.QAbstractAxis.orientation()¶
- Return type
This property holds The orientation of the axis..
Fixed to either Horizontal
or Vertical
when the axis is added to a chart.
- PySide6.QtCharts.QAbstractAxis.reverseChanged(reverse)¶
- Parameters
reverse – bool
- PySide6.QtCharts.QAbstractAxis.setGridLineColor(color)¶
- Parameters
color –
PySide6.QtGui.QColor
This property holds The color of the grid line..
- PySide6.QtCharts.QAbstractAxis.setGridLinePen(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
This property holds The pen used to draw the grid line..
- PySide6.QtCharts.QAbstractAxis.setGridLineVisible([visible=true])¶
- Parameters
visible – bool
This property holds The visibility of the grid lines..
- PySide6.QtCharts.QAbstractAxis.setLabelsAngle(angle)¶
- Parameters
angle – int
This property holds The angle of the axis labels in degrees..
- PySide6.QtCharts.QAbstractAxis.setLabelsBrush(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
This property holds The brush used to draw the labels..
Only the color of the brush is relevant.
- PySide6.QtCharts.QAbstractAxis.setLabelsColor(color)¶
- Parameters
color –
PySide6.QtGui.QColor
This property holds The color of the axis labels..
- PySide6.QtCharts.QAbstractAxis.setLabelsEditable([editable=true])¶
- Parameters
editable – bool
Sets axis labels editability to editable
.
When the labels are editable the user will be able to change the range of the axis conveniently by editing any of the labels. This feature is only supported for the QValueAxis
and the QDateTimeAxis
.
By default, labels are not editable.
See also
- PySide6.QtCharts.QAbstractAxis.setLabelsFont(font)¶
- Parameters
font –
PySide6.QtGui.QFont
This property holds The font of the axis labels..
- PySide6.QtCharts.QAbstractAxis.setLabelsVisible([visible=true])¶
- Parameters
visible – bool
This property holds Whether axis labels are visible..
- PySide6.QtCharts.QAbstractAxis.setLinePen(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
This property holds The pen used to draw the line..
- PySide6.QtCharts.QAbstractAxis.setLinePenColor(color)¶
- Parameters
color –
PySide6.QtGui.QColor
This property holds The color of the axis and tick marks..
- PySide6.QtCharts.QAbstractAxis.setLineVisible([visible=true])¶
- Parameters
visible – bool
This property holds The visibility of the axis line..
- PySide6.QtCharts.QAbstractAxis.setMax(max)¶
- Parameters
max – object
Sets the maximum value shown on the axis. Depending on the actual axis type, the max
parameter is converted to the appropriate type of value. If the conversion is impossible, the function call does nothing.
- PySide6.QtCharts.QAbstractAxis.setMin(min)¶
- Parameters
min – object
Sets the minimum value shown on the axis. Depending on the actual axis type, the min
parameter is converted to the appropriate type of value. If the conversion is impossible, the function call does nothing.
- PySide6.QtCharts.QAbstractAxis.setMinorGridLineColor(color)¶
- Parameters
color –
PySide6.QtGui.QColor
This property holds The color of the minor grid line..
Applies only to axes that support minor grid lines.
- PySide6.QtCharts.QAbstractAxis.setMinorGridLinePen(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
This property holds The pen used to draw the minor grid line..
Applies only to axes that support minor grid lines.
- PySide6.QtCharts.QAbstractAxis.setMinorGridLineVisible([visible=true])¶
- Parameters
visible – bool
This property holds The visibility of the minor grid lines..
Applies only to axes that support minor grid lines.
- PySide6.QtCharts.QAbstractAxis.setRange(min, max)¶
- Parameters
min – object
max – object
Sets the range shown on the axis. Depending on the actual axis type, the min
and max
parameters are converted to appropriate types of values. If the conversion is impossible, the function call does nothing.
- PySide6.QtCharts.QAbstractAxis.setReverse([reverse=true])¶
- Parameters
reverse – bool
This property holds Whether a reverse axis is used..
By default, the value is false
.
The reverse axis is supported with a line, spline, and scatter series, as well as an area series with a cartesian chart. All axes of the same orientation attached to the same series must be reversed if one is reversed or the behavior is undefined.
- PySide6.QtCharts.QAbstractAxis.setShadesBorderColor(color)¶
- Parameters
color –
PySide6.QtGui.QColor
This property holds The border (pen) color of the axis shades..
- PySide6.QtCharts.QAbstractAxis.setShadesBrush(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
This property holds The brush used to draw the axis shades (the area between the grid lines)..
- PySide6.QtCharts.QAbstractAxis.setShadesColor(color)¶
- Parameters
color –
PySide6.QtGui.QColor
This property holds The fill (brush) color of the axis shades..
- PySide6.QtCharts.QAbstractAxis.setShadesPen(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
This property holds The pen used to draw the axis shades (the area between the grid lines)..
- PySide6.QtCharts.QAbstractAxis.setShadesVisible([visible=true])¶
- Parameters
visible – bool
This property holds The visibility of the axis shades..
- PySide6.QtCharts.QAbstractAxis.setTitleBrush(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
This property holds The brush used to draw the title text..
Only the color of the brush is relevant.
- PySide6.QtCharts.QAbstractAxis.setTitleFont(font)¶
- Parameters
font –
PySide6.QtGui.QFont
This property holds The font of the title of the axis..
- PySide6.QtCharts.QAbstractAxis.setTitleText(title)¶
- Parameters
title – str
This property holds The title of the axis..
Empty by default. Axis titles support HTML formatting.
- PySide6.QtCharts.QAbstractAxis.setTitleVisible([visible=true])¶
- Parameters
visible – bool
This property holds The visibility of the axis title..
By default, the value is true
.
- PySide6.QtCharts.QAbstractAxis.setTruncateLabels([truncateLabels=true])¶
- Parameters
truncateLabels – bool
This property holds The truncation state of labels..
Indicates whether labels should be truncated if there is no enough space for full text. It is equal to true
by default.
- PySide6.QtCharts.QAbstractAxis.setVisible([visible=true])¶
- Parameters
visible – bool
This property holds The visibility of the axis..
- PySide6.QtCharts.QAbstractAxis.shadesBorderColor()¶
- Return type
This property holds The border (pen) color of the axis shades..
- PySide6.QtCharts.QAbstractAxis.shadesBorderColorChanged(color)¶
- Parameters
color –
PySide6.QtGui.QColor
- PySide6.QtCharts.QAbstractAxis.shadesBrush()¶
- Return type
This property holds The brush used to draw the axis shades (the area between the grid lines)..
- PySide6.QtCharts.QAbstractAxis.shadesBrushChanged(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
- PySide6.QtCharts.QAbstractAxis.shadesColor()¶
- Return type
This property holds The fill (brush) color of the axis shades..
- PySide6.QtCharts.QAbstractAxis.shadesColorChanged(color)¶
- Parameters
color –
PySide6.QtGui.QColor
- PySide6.QtCharts.QAbstractAxis.shadesPen()¶
- Return type
This property holds The pen used to draw the axis shades (the area between the grid lines)..
- PySide6.QtCharts.QAbstractAxis.shadesPenChanged(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
- PySide6.QtCharts.QAbstractAxis.shadesVisible()¶
- Return type
bool
This property holds The visibility of the axis shades..
- PySide6.QtCharts.QAbstractAxis.shadesVisibleChanged(visible)¶
- Parameters
visible – bool
- PySide6.QtCharts.QAbstractAxis.show()¶
Makes the axis, shades, labels, and grid lines visible.
- PySide6.QtCharts.QAbstractAxis.titleBrush()¶
- Return type
This property holds The brush used to draw the title text..
Only the color of the brush is relevant.
- PySide6.QtCharts.QAbstractAxis.titleBrushChanged(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
- PySide6.QtCharts.QAbstractAxis.titleFont()¶
- Return type
This property holds The font of the title of the axis..
- PySide6.QtCharts.QAbstractAxis.titleFontChanged(font)¶
- Parameters
font –
PySide6.QtGui.QFont
- PySide6.QtCharts.QAbstractAxis.titleText()¶
- Return type
str
This property holds The title of the axis..
Empty by default. Axis titles support HTML formatting.
- PySide6.QtCharts.QAbstractAxis.titleTextChanged(title)¶
- Parameters
title – str
- PySide6.QtCharts.QAbstractAxis.titleVisibleChanged(visible)¶
- Parameters
visible – bool
- PySide6.QtCharts.QAbstractAxis.truncateLabels()¶
- Return type
bool
This property holds The truncation state of labels..
Indicates whether labels should be truncated if there is no enough space for full text. It is equal to true
by default.
- PySide6.QtCharts.QAbstractAxis.truncateLabelsChanged(truncateLabels)¶
- Parameters
truncateLabels – bool
Returns the type of the axis.
- PySide6.QtCharts.QAbstractAxis.visibleChanged(visible)¶
- Parameters
visible – bool
© 2022 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.