- class QAbstractAxis#
The
QAbstractAxis
class is a base class used for specialized axis classes. More…Inherited by:
QValueAxis
,QBarCategoryAxis
,QLogValueAxis
,QDateTimeAxis
,QColorAxis
,QCategoryAxis
Synopsis#
Properties#
alignmentᅟ
- Of the axiscolorᅟ
- Of the axis and tick marksgridLineColorᅟ
- Color of the grid linegridLinePenᅟ
- Pen used to draw the grid linegridVisibleᅟ
- Visibility of the grid lineslabelsAngleᅟ
- Angle of the axis labels in degreeslabelsBrushᅟ
- Brush used to draw the labelslabelsColorᅟ
- Color of the axis labelslabelsFontᅟ
- Font of the axis labelslabelsTruncatedᅟ
- Returns true if at least one label on the axis is truncatedlabelsVisibleᅟ
- Whether axis labels are visiblelinePenᅟ
- Pen used to draw the linelineVisibleᅟ
- Visibility of the axis lineminorGridLineColorᅟ
- Color of the minor grid lineminorGridLinePenᅟ
- Pen used to draw the minor grid lineminorGridVisibleᅟ
- Visibility of the minor grid linesorientationᅟ
- Of the axisreverseᅟ
- Whether a reverse axis is usedshadesBorderColorᅟ
- Border (pen) color of the axis shadesshadesBrushᅟ
- Brush used to draw the axis shades (the area between the grid lines)shadesColorᅟ
- Fill (brush) color of the axis shadesshadesPenᅟ
- Pen used to draw the axis shades (the area between the grid lines)shadesVisibleᅟ
- Visibility of the axis shadestitleBrushᅟ
- Brush used to draw the title texttitleFontᅟ
- Font of the title of the axistitleTextᅟ
- Title of the axistitleVisibleᅟ
- Visibility of the axis titletruncateLabelsᅟ
- Truncation state of labelsvisibleᅟ
- Visibility of the axis
Methods#
def
alignment()
def
gridLineColor()
def
gridLinePen()
def
hide()
def
isLineVisible()
def
isReverse()
def
isTitleVisible()
def
isVisible()
def
labelsAngle()
def
labelsBrush()
def
labelsColor()
def
labelsEditable()
def
labelsFont()
def
labelsVisible()
def
linePen()
def
linePenColor()
def
orientation()
def
setGridLinePen()
def
setLabelsAngle()
def
setLabelsBrush()
def
setLabelsColor()
def
setLabelsFont()
def
setLinePen()
def
setLineVisible()
def
setMax()
def
setMin()
def
setRange()
def
setReverse()
def
setShadesBrush()
def
setShadesColor()
def
setShadesPen()
def
setTitleBrush()
def
setTitleFont()
def
setTitleText()
def
setVisible()
def
shadesBrush()
def
shadesColor()
def
shadesPen()
def
shadesVisible()
def
show()
def
titleBrush()
def
titleFont()
def
titleText()
def
truncateLabels()
Signals#
def
colorChanged()
def
linePenChanged()
def
reverseChanged()
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 one or more horizontal and vertical axes, but mixing axis types that would result in different domains is not supported, such as specifying
QValueAxis
andQLogValueAxis
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 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
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:
This property holds The color of the axis and tick marks..
- Access functions:
This property holds The color of the grid line..
- Access functions:
This property holds The pen used to draw the grid line..
- Access functions:
- property gridVisibleᅟ: bool#
This property holds The visibility of the grid lines..
- Access functions:
- property labelsAngleᅟ: int#
This property holds The angle of the axis labels in degrees..
- Access functions:
This property holds The brush used to draw the labels..
Only the color of the brush is relevant.
- Access functions:
This property holds The color of the axis labels..
- Access functions:
This property holds The font of the axis labels..
- Access functions:
- property labelsTruncatedᅟ: 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.
- Access functions:
- property labelsVisibleᅟ: bool#
This property holds Whether axis labels are visible..
- Access functions:
This property holds The pen used to draw the line..
- Access functions:
- property lineVisibleᅟ: bool#
This property holds The visibility of the axis line..
- Access functions:
This property holds The color of the minor grid line..
Applies only to axes that support minor grid lines.
- Access functions:
This property holds The pen used to draw the minor grid line..
Applies only to axes that support minor grid lines.
- Access functions:
- property minorGridVisibleᅟ: bool#
This property holds The visibility of the minor grid lines..
Applies only to axes that support minor grid lines.
- Access functions:
- property orientationᅟ: Qt.Orientation#
This property holds The orientation of the axis..
Fixed to either Qt::Horizontal or Qt::Vertical when the axis is added to a chart.
- Access functions:
- property 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.
- Access functions:
This property holds The border (pen) color of the axis shades..
- Access functions:
This property holds The brush used to draw the axis shades (the area between the grid lines)..
- Access functions:
This property holds The fill (brush) color of the axis shades..
- Access functions:
This property holds The pen used to draw the axis shades (the area between the grid lines)..
- Access functions:
- property shadesVisibleᅟ: bool#
This property holds The visibility of the axis shades..
- Access functions:
This property holds The brush used to draw the title text..
Only the color of the brush is relevant.
- 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 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.- Access functions:
- property visibleᅟ: bool#
This property holds The visibility of the axis..
- Access functions:
- alignment()#
- Return type:
Combination of
AlignmentFlag
Getter of property
alignmentᅟ
.This signal is emitted when the color of the axis changes to
color
.Notification signal of property
colorᅟ
.- gridLineColor()#
- Return type:
See also
Getter of property
gridLineColorᅟ
.This signal is emitted when the color of the pen used to draw the grid line changes to
color
.Notification signal of property
gridLineColorᅟ
.Returns the pen used to draw the grid.
See also
Getter of property
gridLinePenᅟ
.This signal is emitted when the pen used to draw the grid line changes to
pen
.Notification signal of property
gridLinePenᅟ
.- gridVisibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the grid lines of the axis changes to
visible
.Notification signal of property
gridVisibleᅟ
.- hide()#
Makes the axis, shades, labels, and grid lines invisible.
- isGridLineVisible()#
- Return type:
bool
Getter of property
gridVisibleᅟ
.- isLineVisible()#
- Return type:
bool
Getter of property
lineVisibleᅟ
.- isMinorGridLineVisible()#
- Return type:
bool
Getter of property
minorGridVisibleᅟ
.- isReverse()#
- Return type:
bool
Getter of property
reverseᅟ
.- isTitleVisible()#
- Return type:
bool
Getter of property
titleVisibleᅟ
.- isVisible()#
- Return type:
bool
Getter of property
visibleᅟ
.- labelsAngle()#
- Return type:
int
See also
Getter of property
labelsAngleᅟ
.- labelsAngleChanged(angle)#
- Parameters:
angle – int
This signal is emitted when the angle of the axis labels changes to
angle
.Notification signal of property
labelsAngleᅟ
.Returns the brush used to draw labels.
See also
Getter of property
labelsBrushᅟ
.This signal is emitted when the brush used to draw the axis labels changes to
brush
.Notification signal of property
labelsBrushᅟ
.- labelsColor()#
- Return type:
See also
Getter of property
labelsColorᅟ
.This signal is emitted when the color of the axis labels changes to
color
.Notification signal of property
labelsColorᅟ
.- labelsEditable()#
- Return type:
bool
Returns
true
if axis labels are editable.See also
- labelsEditableChanged(editable)#
- Parameters:
editable – bool
This signal is emitted when the
editable
state of the label changes.Returns the font used to draw labels.
See also
Getter of property
labelsFontᅟ
.This signal is emitted when the font of the axis labels changes to
font
.Notification signal of property
labelsFontᅟ
.- labelsTruncated()#
- Return type:
bool
Getter of property
labelsTruncatedᅟ
.- labelsTruncatedChanged(labelsTruncated)#
- Parameters:
labelsTruncated – bool
This signal is emitted in two cases; when the axis changes from having one or more truncated labels to having no truncated labels, and when the axis changes from having no truncated labels to having one or more truncated labels. Current state is identified by
labelsTruncated
.Notification signal of property
labelsTruncatedᅟ
.- labelsVisible()#
- Return type:
bool
See also
Getter of property
labelsVisibleᅟ
.- labelsVisibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the labels of the axis changes to
visible
.Notification signal of property
labelsVisibleᅟ
.Returns the pen used to draw the axis line and tick marks.
See also
Getter of property
linePenᅟ
.This signal is emitted when the pen used to draw the line of the axis changes to
pen
.Notification signal of property
linePenᅟ
.- linePenColor()#
- Return type:
See also
Getter of property
colorᅟ
.- lineVisibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the axis line changes to
visible
.Notification signal of property
lineVisibleᅟ
.- minorGridLineColor()#
- Return type:
See also
Getter of property
minorGridLineColorᅟ
.This signal is emitted when the color of the pen used to draw the minor grid line changes to
color
.Notification signal of property
minorGridLineColorᅟ
.- minorGridLinePen()#
- Return type:
See also
Getter of property
minorGridLinePenᅟ
.This signal is emitted when the pen used to draw the minor grid line changes to
pen
.Notification signal of property
minorGridLinePenᅟ
.- minorGridVisibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the minor grid lines of the axis changes to
visible
.Notification signal of property
minorGridVisibleᅟ
.- orientation()#
- Return type:
Returns the orientation of the axis (vertical or horizontal).
Getter of property
orientationᅟ
.- reverseChanged(reverse)#
- Parameters:
reverse – bool
Notification signal of property
reverseᅟ
.Setter of property
gridLineColorᅟ
.Sets the pen used to draw the grid lines to
pen
.See also
Setter of property
gridLinePenᅟ
.- setGridLineVisible([visible=true])#
- Parameters:
visible – bool
See also
Setter of property
gridVisibleᅟ
.- setLabelsAngle(angle)#
- Parameters:
angle – int
See also
Setter of property
labelsAngleᅟ
.Sets the brush used to draw labels to
brush
.See also
Setter of property
labelsBrushᅟ
.Setter of property
labelsColorᅟ
.- 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 theQDateTimeAxis
.By default, labels are not editable.
See also
Sets the font used to draw labels to
font
.See also
Setter of property
labelsFontᅟ
.- setLabelsVisible([visible=true])#
- Parameters:
visible – bool
See also
Setter of property
labelsVisibleᅟ
.Sets the pen used to draw the axis line and tick marks to
pen
.See also
Setter of property
linePenᅟ
.Setter of property
colorᅟ
.- 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.Setter of property
minorGridLineColorᅟ
.Setter of property
minorGridLinePenᅟ
.- setMinorGridLineVisible([visible=true])#
- Parameters:
visible – bool
See also
Setter of property
minorGridVisibleᅟ
.- 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.- setReverse([reverse=true])#
- Parameters:
reverse – bool
See also
Setter of property
reverseᅟ
.Setter of property
shadesBorderColorᅟ
.Sets the brush used to draw shades to
brush
.See also
Setter of property
shadesBrushᅟ
.Setter of property
shadesColorᅟ
.Sets the pen used to draw shades to
pen
.See also
Setter of property
shadesPenᅟ
.- setShadesVisible([visible=true])#
- Parameters:
visible – bool
See also
Setter of property
shadesVisibleᅟ
.Sets the brush used to draw titles to
brush
.See also
Setter of property
titleBrushᅟ
.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ᅟ
.- setTruncateLabels([truncateLabels=true])#
- Parameters:
truncateLabels – bool
See also
Setter of property
truncateLabelsᅟ
.- setVisible([visible=true])#
- Parameters:
visible – bool
Sets the visibility of the axis, shades, labels, and grid lines to
visible
.See also
Setter of property
visibleᅟ
.- shadesBorderColor()#
- Return type:
See also
Getter of property
shadesBorderColorᅟ
.This signal is emitted when the border color of the axis shades changes to
color
.Notification signal of property
shadesBorderColorᅟ
.Returns the brush used to draw shades.
See also
Getter of property
shadesBrushᅟ
.This signal is emitted when the brush used to draw the axis shades changes to
brush
.Notification signal of property
shadesBrushᅟ
.- shadesColor()#
- Return type:
See also
Getter of property
shadesColorᅟ
.This signal is emitted when the color of the axis shades changes to
color
.Notification signal of property
shadesColorᅟ
.Returns the pen used to draw shades.
See also
Getter of property
shadesPenᅟ
.This signal is emitted when the pen used to draw the axis shades changes to
pen
.Notification signal of property
shadesPenᅟ
.- shadesVisible()#
- Return type:
bool
See also
Getter of property
shadesVisibleᅟ
.- shadesVisibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the axis shades changes to
visible
.Notification signal of property
shadesVisibleᅟ
.- show()#
Makes the axis, shades, labels, and grid lines visible.
Returns the brush used to draw titles.
See also
Getter of property
titleBrushᅟ
.This signal is emitted when the brush used to draw the axis title changes to
brush
.Notification signal of property
titleBrushᅟ
.Returns the font used to draw titles.
See also
Getter of property
titleFontᅟ
.This signal is emitted when the font of the axis title changes to
font
.Notification signal of property
titleFontᅟ
.- titleText()#
- Return type:
str
See also
Getter of property
titleTextᅟ
.- titleTextChanged(title)#
- Parameters:
title – str
This signal is emitted when the text of the axis title changes to
text
.Notification signal of property
titleTextᅟ
.- titleVisibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the title text of the axis changes to
visible
.Notification signal of property
titleVisibleᅟ
.- truncateLabels()#
- Return type:
bool
See also
Getter of property
truncateLabelsᅟ
.- truncateLabelsChanged(truncateLabels)#
- Parameters:
truncateLabels – bool
This signal is emitted when the truncation of the labels changes to
truncateLabels
.Notification signal of property
truncateLabelsᅟ
.- visibleChanged(visible)#
- Parameters:
visible – bool
This signal is emitted when the visibility of the axis changes to
visible
.Notification signal of property
visibleᅟ
.