Qt 5.8 | Qt Charts | QML Types | BoxSet QML Type

Qt 5.8.0 Reference Documentation

# BoxSet QML Type

Represents one item in a box-and-whiskers chart. More...

Import Statement: | import QtCharts 2.2
Instantiates: | QBoxSet

- List of all members, including inherited members

## Properties

- ValuePositions : enumeration
- count : int
- label : string
- values : string

## Signals

- onBrushChanged()
- onChangedValue(int index)
- onChangedValues()
- onCleared()
- onClicked()
- onDoubleClicked()
- onHovered(bool status)
- onPenChanged()
- onPressed()
- onReleased()

## Methods

- void append(qreal value)
- void at(int index)
- void clear()
- void setValue(int index, qreal value)

## 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 the append() method. 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 BoxSet instance and specify the values using the setValue() method.

See also BoxPlotSeries.

## Property Documentation

ValuePositions : enumeration

This enum type defines the values of a box-and-whiskers item:

Constant | Description
--- | ---
`BoxSet.LowerExtreme` | The smallest value of the box-and-whiskers item.
`BoxSet.LowerQuartile` | The median value of the lower half of the box-and-whiskers item.
`BoxSet.Median` | The median value of the box-and-whiskers item.
`BoxSet.UpperQuartile` | The median value of the upper half of the box-and-whiskers item.
`BoxSet.UpperExtreme` | The largest value of the box-and-whiskers item.

count : int

The number of values of the box-and-whiskers item.

label : string

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

values : string

The values of the box-and-whiskers item.

## Signal Documentation

onBrushChanged()

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

onChangedValue(int index)

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

onChangedValues()

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

onCleared()

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

onClicked()

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

onDoubleClicked()

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

onHovered(bool status)

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

onPenChanged()

This signal is emitted when the pen used to draw the lines of the box-and-whiskers item changes.

onPressed()

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

onReleased()

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

## Method Documentation

void append(qreal value)

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

void at(int index)

Returns the value in the position specified by index.

void clear()

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

void setValue(int index, qreal value)

Sets the value specified by value in the position specified by index.