PySide6.QtGraphs.QAbstractAxis¶
- class QAbstractAxis¶
The
QAbstractAxis
class is a base class used for specialized axis classes. More…Inherited by:
QValueAxis
,QDateTimeAxis
,QBarCategoryAxis
Synopsis¶
Properties¶
alignmentᅟ
- Of the axisgridVisibleᅟ
- Visibility of the grid lines. By default, the value is truelabelDelegateᅟ
- A custom QML Component used as a label for the axis. This component should either be a Text component or contain “property string text”, so that this property will be assigned the value of the labellabelsAngleᅟ
- Angle of the axis labels in degreeslabelsVisibleᅟ
- Whether axis labels are visible. By default, the value is truelineVisibleᅟ
- Visibility of the axis line. By default, the value is truesubGridVisibleᅟ
- Visibility of the subgrid linestitleColorᅟ
- Color used to draw the title texttitleFontᅟ
- Font of the title of the axistitleTextᅟ
- Title of the axistitleVisibleᅟ
- Visibility of the axis titlevisibleᅟ
- Visibility of the axis. By default, the value is true
Methods¶
def
alignment()
def
hide()
def
isGridVisible()
def
isLineVisible()
def
isTitleVisible()
def
isVisible()
def
labelDelegate()
def
labelsAngle()
def
labelsVisible()
def
setAlignment()
def
setGridVisible()
def
setLabelsAngle()
def
setLineVisible()
def
setMax()
def
setMin()
def
setRange()
def
setTitleColor()
def
setTitleFont()
def
setTitleText()
def
setVisible()
def
show()
def
titleColor()
def
titleFont()
def
titleText()
Virtual methods¶
def
type()
Signals¶
def
rangeChanged()
def
update()
def
visibleChanged()
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¶
Each series can be bound to only one horizontal and vertical axis.
The properties and visibility of various axis elements, such as axis line, title, labels, and grid lines, can be individually controlled.
- class AxisType¶
This enum type specifies the type of the axis object.
Constant
Description
QAbstractAxis.AxisType.AxisType.Value
QAbstractAxis.AxisType.AxisType.BarCategory
QAbstractAxis.AxisType.AxisType.DateTime
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property alignmentᅟ: Combination of Qt.AlignmentFlag¶
This property holds The alignment of the axis..
Can be Qt::AlignLeft, Qt::AlignRight, Qt::AlignBottom, or Qt::AlignTop.
- Access functions:
- property gridVisibleᅟ: bool¶
This property holds The visibility of the grid lines. By default, the value is
true
..- Access functions:
- property labelDelegateᅟ: QQmlComponent¶
This property holds A custom QML Component used as a label for the axis. This component should either be a
Text
component or contain “property string text”, so that this property will be assigned the value of the label..- Access functions:
- property labelsAngleᅟ: float¶
This property holds The angle of the axis labels in degrees..
- Access functions:
- property labelsVisibleᅟ: bool¶
This property holds Whether axis labels are visible. By default, the value is
true
..- Access functions:
- property lineVisibleᅟ: bool¶
This property holds The visibility of the axis line. By default, the value is
true
..- Access functions:
- property subGridVisibleᅟ: bool¶
This property holds The visibility of the subgrid lines..
Applies only to axes that support subgrid lines. By default, the value is
true
.- Access functions:
This property holds The color used to draw the title text..
- Access functions:
This property holds The font of the title of the axis..
- Access functions:
- property titleTextᅟ: str¶
This property holds The title of the axis..
Empty by default. Axis titles support HTML formatting.
- Access functions:
- property titleVisibleᅟ: bool¶
This property holds The visibility of the axis title..
By default, the value is
true
.- Access functions:
- property visibleᅟ: bool¶
This property holds The visibility of the axis. By default, the value is
true
..- Access functions:
- alignment()¶
- Return type:
Combination of
AlignmentFlag
See also
Getter of property
alignmentᅟ
.- alignmentChanged(alignment)¶
- Parameters:
alignment – Combination of
AlignmentFlag
Notification signal of property
alignmentᅟ
.- gridVisibleChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
gridVisibleᅟ
.- hide()¶
Makes the axis, labels, and grid lines invisible.
- isGridVisible()¶
- Return type:
bool
Getter of property
gridVisibleᅟ
.- isLineVisible()¶
- Return type:
bool
Getter of property
lineVisibleᅟ
.- isSubGridVisible()¶
- Return type:
bool
Getter of property
subGridVisibleᅟ
.- isTitleVisible()¶
- Return type:
bool
Getter of property
titleVisibleᅟ
.- isVisible()¶
- Return type:
bool
Getter of property
visibleᅟ
.- labelDelegate()¶
- Return type:
See also
Getter of property
labelDelegateᅟ
.- labelDelegateChanged()¶
Notification signal of property
labelDelegateᅟ
.- labelsAngle()¶
- Return type:
float
See also
Getter of property
labelsAngleᅟ
.- labelsAngleChanged(angle)¶
- Parameters:
angle – float
Notification signal of property
labelsAngleᅟ
.- labelsVisible()¶
- Return type:
bool
See also
Getter of property
labelsVisibleᅟ
.- labelsVisibleChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
labelsVisibleᅟ
.- lineVisibleChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
lineVisibleᅟ
.- rangeChanged(min, max)¶
- Parameters:
min – float
max – float
- setAlignment(alignment)¶
- Parameters:
alignment – Combination of
AlignmentFlag
See also
Setter of property
alignmentᅟ
.- setGridVisible([visible=true])¶
- Parameters:
visible – bool
See also
Setter of property
gridVisibleᅟ
.- setLabelDelegate(newLabelDelegate)¶
- Parameters:
newLabelDelegate –
QQmlComponent
See also
Setter of property
labelDelegateᅟ
.- setLabelsAngle(angle)¶
- Parameters:
angle – float
See also
Setter of property
labelsAngleᅟ
.- setLabelsVisible([visible=true])¶
- Parameters:
visible – bool
See also
Setter of property
labelsVisibleᅟ
.- setLineVisible([visible=true])¶
- Parameters:
visible – bool
Determines whether the axis line and tick marks are
visible
.See also
Setter of property
lineVisibleᅟ
.- 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.- 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.- setRange(min, max)¶
- Parameters:
min – object
max – object
Sets the range shown on the axis. Depending on the actual axis type, the
min
andmax
parameters are converted to appropriate types of values. If the conversion is impossible, the function call does nothing.- setSubGridVisible([visible=true])¶
- Parameters:
visible – bool
See also
Setter of property
subGridVisibleᅟ
.Sets the color used to draw titles to
color
.See also
Setter of property
titleColorᅟ
.Sets the font used to draw titles to
font
.See also
Setter of property
titleFontᅟ
.- setTitleText(title)¶
- Parameters:
title – str
See also
Setter of property
titleTextᅟ
.- setTitleVisible([visible=true])¶
- Parameters:
visible – bool
See also
Setter of property
titleVisibleᅟ
.- setVisible([visible=true])¶
- Parameters:
visible – bool
Sets the visibility of the axis, labels, and grid lines to
visible
.See also
Setter of property
visibleᅟ
.- show()¶
Makes the axis, labels, and grid lines visible.
- subGridVisibleChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
subGridVisibleᅟ
.Returns the color used to draw titles.
See also
Getter of property
titleColorᅟ
.Notification signal of property
titleColorᅟ
.Returns the font used to draw titles.
See also
Getter of property
titleFontᅟ
.Notification signal of property
titleFontᅟ
.- titleText()¶
- Return type:
str
See also
Getter of property
titleTextᅟ
.- titleTextChanged(title)¶
- Parameters:
title – str
Notification signal of property
titleTextᅟ
.- titleVisibleChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
titleVisibleᅟ
.Returns the type of the axis.
- update()¶
This signal is emitted when the axis needs to be updated.
- visibleChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
visibleᅟ
.