QLegendMarker

The QLegendMarker class is an abstract object that can be used to access markers within a legend. More

Inheritance diagram of PySide6.QtCharts.QLegendMarker

Inherited by: QXYLegendMarker, QPieLegendMarker, QCandlestickLegendMarker, QBoxPlotLegendMarker, QBarLegendMarker, QAreaLegendMarker

Synopsis

Functions

Virtual functions

Signals

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.

../../_images/examples_percentbarchart_legend.png

See also

QLegend

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

PySide6.QtGui.QBrush

This property holds The brush used to fill the icon..

PySide6.QtCharts.QLegendMarker.brushChanged()
PySide6.QtCharts.QLegendMarker.clicked()
PySide6.QtCharts.QLegendMarker.font()
Return type

PySide6.QtGui.QFont

This property holds The font of the label..

PySide6.QtCharts.QLegendMarker.fontChanged()
PySide6.QtCharts.QLegendMarker.hovered(status)
Parameters

status – bool

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

PySide6.QtGui.QBrush

This property holds The brush of the label..

PySide6.QtCharts.QLegendMarker.labelBrushChanged()
PySide6.QtCharts.QLegendMarker.labelChanged()
PySide6.QtCharts.QLegendMarker.pen()
Return type

PySide6.QtGui.QPen

This property holds The pen used to draw the outline of the icon..

PySide6.QtCharts.QLegendMarker.penChanged()
PySide6.QtCharts.QLegendMarker.series()
Return type

PySide6.QtCharts.QAbstractSeries

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

brushPySide6.QtGui.QBrush

This property holds The brush used to fill the icon..

PySide6.QtCharts.QLegendMarker.setFont(font)
Parameters

fontPySide6.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

brushPySide6.QtGui.QBrush

This property holds The brush of the label..

PySide6.QtCharts.QLegendMarker.setPen(pen)
Parameters

penPySide6.QtGui.QPen

This property holds The pen used to draw the outline of the icon..

PySide6.QtCharts.QLegendMarker.setShape(shape)
Parameters

shapeMarkerShape

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

MarkerShape

The shape of the legend marker. Defaults to MarkerShapeDefault , which indicates the shape is determined by markerShape property.

PySide6.QtCharts.QLegendMarker.shapeChanged()
PySide6.QtCharts.QLegendMarker.type()
Return type

LegendMarkerType

Returns the type of the legend marker for the related series, pie slice, or bar set.

See also

LegendMarkerType

PySide6.QtCharts.QLegendMarker.visibleChanged()