QLegendMarker#
The QLegendMarker
class is an abstract object that can be used to access markers within a legend. More…
Inherited by: QXYLegendMarker, QPieLegendMarker, QCandlestickLegendMarker, QBoxPlotLegendMarker, QBarLegendMarker, QAreaLegendMarker
Synopsis#
Functions#
def
brush
()def
font
()def
isVisible
()def
label
()def
labelBrush
()def
pen
()def
setBrush
(brush)def
setFont
(font)def
setLabel
(label)def
setLabelBrush
(brush)def
setPen
(pen)def
setShape
(shape)def
setVisible
(visible)def
shape
()
Virtual functions#
Signals#
def
brushChanged
()def
clicked
()def
fontChanged
()def
hovered
(status)def
labelBrushChanged
()def
labelChanged
()def
penChanged
()def
shapeChanged
()def
visibleChanged
()
Detailed Description#
A legend marker consists of an icon and a label. The icon color corresponds to the color used to draw a series and the label displays the name of the series (or the label of the slice for a pie series or bar set for a bar series). A legend marker is always related to one series, slice, or bar set.
![]()
See also
- class PySide6.QtCharts.QLegendMarker#
- PySide6.QtCharts.QLegendMarker.LegendMarkerType#
The type of the legend marker object.
Constant
Description
QLegendMarker.LegendMarkerTypeArea
A legend marker for an area series.
QLegendMarker.LegendMarkerTypeBar
A legend marker for a bar set.
QLegendMarker.LegendMarkerTypePie
A legend marker for a pie slice.
QLegendMarker.LegendMarkerTypeXY
A legend marker for a line, spline, or scatter series.
QLegendMarker.LegendMarkerTypeBoxPlot
A legend marker for a box plot series.
QLegendMarker.LegendMarkerTypeCandlestick
A legend marker for a candlestick series.
- PySide6.QtCharts.QLegendMarker.brush()#
- Return type
This property holds The brush used to fill the icon..
- PySide6.QtCharts.QLegendMarker.brushChanged()#
This signal is emitted when the brush of the legend marker has changed.
- PySide6.QtCharts.QLegendMarker.clicked()#
This signal is emitted when the legend marker is clicked.
- PySide6.QtCharts.QLegendMarker.font()#
- Return type
This property holds The font of the label..
- PySide6.QtCharts.QLegendMarker.fontChanged()#
This signal is emitted when the (label) font of the legend marker has changed.
- PySide6.QtCharts.QLegendMarker.hovered(status)#
- Parameters
status – bool
This signal is emitted when a mouse is hovered over the legend marker. When the mouse moves over the marker, status
turns true
, and when the mouse moves away again, it turns false
.
- PySide6.QtCharts.QLegendMarker.isVisible()#
- Return type
bool
This property holds The visibility of the legend marker..
The visibility affects both the legend marker label and the icon.
- PySide6.QtCharts.QLegendMarker.label()#
- Return type
str
This property holds The text shown in the legend for a legend marker..
- PySide6.QtCharts.QLegendMarker.labelBrush()#
- Return type
This property holds The brush of the label..
- PySide6.QtCharts.QLegendMarker.labelBrushChanged()#
This signal is emitted when the label brush of the legend marker has changed.
- PySide6.QtCharts.QLegendMarker.labelChanged()#
This signal is emitted when the label of the legend marker has changed.
- PySide6.QtCharts.QLegendMarker.pen()#
- Return type
This property holds The pen used to draw the outline of the icon..
- PySide6.QtCharts.QLegendMarker.penChanged()#
This signal is emitted when the pen of the legend marker has changed.
- abstract PySide6.QtCharts.QLegendMarker.series()#
- Return type
Returns a pointer to the series that is related to this legend marker. A legend marker is always related to a series.
- PySide6.QtCharts.QLegendMarker.setBrush(brush)#
- Parameters
brush –
PySide6.QtGui.QBrush
This property holds The brush used to fill the icon..
- PySide6.QtCharts.QLegendMarker.setFont(font)#
- Parameters
font –
PySide6.QtGui.QFont
This property holds The font of the label..
- PySide6.QtCharts.QLegendMarker.setLabel(label)#
- Parameters
label – str
This property holds The text shown in the legend for a legend marker..
- PySide6.QtCharts.QLegendMarker.setLabelBrush(brush)#
- Parameters
brush –
PySide6.QtGui.QBrush
This property holds The brush of the label..
- PySide6.QtCharts.QLegendMarker.setPen(pen)#
- Parameters
pen –
PySide6.QtGui.QPen
This property holds The pen used to draw the outline of the icon..
- PySide6.QtCharts.QLegendMarker.setShape(shape)#
- Parameters
shape –
MarkerShape
The shape of the legend marker. Defaults to MarkerShapeDefault
, which indicates the shape is determined by markerShape
property.
- PySide6.QtCharts.QLegendMarker.setVisible(visible)#
- Parameters
visible – bool
This property holds The visibility of the legend marker..
The visibility affects both the legend marker label and the icon.
- PySide6.QtCharts.QLegendMarker.shape()#
- Return type
The shape of the legend marker. Defaults to MarkerShapeDefault
, which indicates the shape is determined by markerShape
property.
- PySide6.QtCharts.QLegendMarker.shapeChanged()#
- abstract PySide6.QtCharts.QLegendMarker.type()#
- Return type
Returns the type of the legend marker for the related series, pie slice, or bar set.
See also
LegendMarkerType
- PySide6.QtCharts.QLegendMarker.visibleChanged()#
This signal is emitted when the visibility of the legend marker has changed.