class QBoxSet#

The QBoxSet class represents one item in a box-and-whiskers chart. More

Inheritance diagram of PySide6.QtCharts.QBoxSet

Synopsis#

Properties#

  • brushᅟ - Used fill the box of the box-and-whiskers item

  • penᅟ - Used to draw the lines of the box-and-whiskers item

Methods#

Signals#

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#

A box-and-whiskers item is a graphical representation of a range and three median values that is constructed from five different values. There are two ways to specify the values. The first one is by using a constructor or stream operator (<<). The values have to be specified in the following order: lower extreme, lower quartile, median, upper quartile, and upper extreme.

The second way is to create an empty QBoxSet instance and specify the values using the setValue() method.

See the Charts with Widgets Gallery to learn how to create a box-and-whiskers chart.

See also

QBoxPlotSeries

class ValuePositions#

(inherits enum.IntEnum) This enum type defines the values of a box-and-whiskers item:

Constant

Description

QBoxSet.LowerExtreme

The smallest value of the box-and-whiskers item.

QBoxSet.LowerQuartile

The median value of the lower half of the box-and-whiskers item.

QBoxSet.Median

The median value of the box-and-whiskers item.

QBoxSet.UpperQuartile

The median value of the upper half of the box-and-whiskers item.

QBoxSet.UpperExtreme

The largest value of the box-and-whiskers item.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property brushᅟ: QBrush#

This property holds The brush used fill the box of the box-and-whiskers item..

Access functions:
property penᅟ: QPen#

This property holds The pen used to draw the lines of the box-and-whiskers item..

Access functions:
__init__(le, lq, m, uq, ue[, label=""[, parent=None]])#
Parameters:
  • le – float

  • lq – float

  • m – float

  • uq – float

  • ue – float

  • label – str

  • parentQObject

Constructs a box-and-whiskers item with the following ordered values: le specifies the lower extreme, lq the lower quartile, m the median, uq the upper quartile, and ue the upper quartile. Optionally, the label and parent can be specified.

__init__([label=""[, parent=None]])
Parameters:

Constructs a box-and-whiskers item with the optional label label and parent parent.

append(values)#
Parameters:

values – .list of qreal

Appends a list of real values specified by values to the end of the box-and-whiskers item.

See also

append()

append(value)
Parameters:

value – float

Appends the new value specified by value to the end of the box-and-whiskers item.

at(index)#
Parameters:

index – int

Return type:

float

Returns the value of the box-and-whiskers item specified by index. The index can be specified by using ValuePositions enumeration values. If the index is out of bounds, 0.0 is returned.

brush()#
Return type:

QBrush

Returns the brush used to fill the box-and-whiskers item.

See also

setBrush()

Getter of property brushᅟ .

brushChanged()#

This signal is emitted when the brush of the box-and-whiskers item changes.

See also

brush

Notification signal of property brushᅟ .

clear()#

Sets all the values of the box-and-whiskers item to 0.

cleared()#

This signal is emitted when all the values of the box-and-whiskers item are set to 0.

clicked()#

This signal is emitted when the user clicks a box-and-whiskers item in the chart.

count()#
Return type:

int

Returns the number of values appended to the box-and-whiskers item.

doubleClicked()#

This signal is emitted when the user double-clicks a box-and-whiskers item.

hovered(status)#
Parameters:

status – bool

This signal is emitted when a mouse is hovered over a box-and-whiskers item in a chart. When the mouse moves over the item, status turns true, and when the mouse moves away again, it turns false.

label()#
Return type:

str

Returns the label of the category of the box-and-whiskers item.

See also

setLabel()

__lshift__(value)#
Parameters:

value – float

Return type:

QBoxSet

A convenience operator for appending the real value specified by value to the end of the box-and-whiskers item.

See also

append()

operator(index)#
Parameters:

index – int

Return type:

float

Returns the value of the box-and-whiskers item specified by index. The index can be specified by using ValuePositions enumeration values. If the index is out of bounds, 0.0 is returned.

pen()#
Return type:

QPen

Returns the pen used to draw the box-and-whiskers item.

See also

setPen()

Getter of property penᅟ .

penChanged()#

This signal is emitted when the pen of the box-and-whiskers item changes.

See also

pen

Notification signal of property penᅟ .

pressed()#

This signal is emitted when the user clicks a box-and-whiskers item in the chart and holds down the mouse button.

released()#

This signal is emitted when the user releases the mouse press on a box-and-whiskers item.

setBrush(brush)#
Parameters:

brushQBrush

Sets the brush used to fill the box-and-whiskers item to brush.

See also

brush()

Setter of property brushᅟ .

setLabel(label)#
Parameters:

label – str

Sets the label specified by label for the category of the box-and-whiskers item.

See also

label()

setPen(pen)#
Parameters:

penQPen

Sets the pen used to draw the box-and-whiskers item to pen.

See also

pen()

Setter of property penᅟ .

setValue(index, value)#
Parameters:
  • index – int

  • value – float

Sets the value specified by value in the position specified by index. The index can be specified by using the ValuePositions enumeration values.

valueChanged(index)#
Parameters:

index – int

This signal is emitted when the value of the box-and-whiskers item specified by index is modified.

See also

at()

valuesChanged()#

This signal is emitted when multiple values of the box-and-whiskers item change.

See also

append()