- class QBoxSet#
The
QBoxSet
class represents one item in a box-and-whiskers chart. More…Synopsis#
Properties#
Methods#
def
__init__()
def
append()
def
at()
def
brush()
def
clear()
def
count()
def
label()
def
__lshift__()
def
operator[]()
def
pen()
def
setBrush()
def
setLabel()
def
setPen()
def
setValue()
Signals#
def
brushChanged()
def
cleared()
def
clicked()
def
doubleClicked()
def
hovered()
def
penChanged()
def
pressed()
def
released()
def
valueChanged()
def
valuesChanged()
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 thesetValue()
method.See the Charts with Widgets Gallery to learn how to create a box-and-whiskers chart.
See also
- 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.This property holds The brush used fill the box of the box-and-whiskers item..
- Access functions:
Signal
brushChanged()
This property holds The pen used to draw the lines of the box-and-whiskers item..
- Access functions:
Signal
penChanged()
- __init__(le, lq, m, uq, ue[, label=""[, parent=None]])#
- Parameters:
le – float
lq – float
m – float
uq – float
ue – float
label – str
parent –
QObject
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, andue
the upper quartile. Optionally, thelabel
andparent
can be specified.- __init__([label=""[, parent=None]])
- Parameters:
label – str
parent –
QObject
Constructs a box-and-whiskers item with the optional label
label
and parentparent
.- 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(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 usingValuePositions
enumeration values. If the index is out of bounds, 0.0 is returned.Returns the brush used to fill the box-and-whiskers item.
See also
Getter of property
brushᅟ
.- brushChanged()#
This signal is emitted when the brush of the box-and-whiskers item changes.
See also
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
turnstrue
, and when the mouse moves away again, it turnsfalse
.- label()#
- Return type:
str
Returns the label of the category of the box-and-whiskers item.
See also
A convenience operator for appending the real value specified by
value
to the end of the box-and-whiskers item.See also
- 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 usingValuePositions
enumeration values. If the index is out of bounds, 0.0 is returned.Returns the pen used to draw the box-and-whiskers item.
See also
Getter of property
penᅟ
.- penChanged()#
This signal is emitted when the pen of the box-and-whiskers item changes.
See also
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.
Sets the brush used to fill the box-and-whiskers item to
brush
.See also
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
Sets the pen used to draw the box-and-whiskers item to
pen
.See also
Setter of property
penᅟ
.- setValue(index, value)#
- Parameters:
index – int
value – float
Sets the value specified by
value
in the position specified byindex
. The index can be specified by using theValuePositions
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
- valuesChanged()#
This signal is emitted when multiple values of the box-and-whiskers item change.
See also