Qt 5.8 | Qt Charts | QML Types | BoxPlotSeries QML Type

Qt 5.8.0 Reference Documentation

# BoxPlotSeries QML Type

Presents data in box-and-whiskers charts. More...

Import Statement: | import QtCharts 2.2
Instantiates: | QBoxPlotSeries
Inherits: | AbstractSeries

- List of all members, including inherited members

## Properties

- axisX : AbstractAxis
- axisXTop : AbstractAxis
- axisY : AbstractAxis
- axisYRight : AbstractAxis
- boxOutlineVisible : bool
- boxWidth : real
- brush : Brush
- brushFilename : string
- count : int
- pen : Pen

## Signals

- onAxisXChanged(AbstractAxis axis)
- onAxisXTopChanged(AbstractAxis axis)
- onAxisYChanged(AbstractAxis axis)
- onAxisYRightChanged(AbstractAxis axis)
- onBoxOutlineVisibilityChanged()
- onBoxWidthChanged()
- onBoxsetsAdded()
- onBoxsetsRemoved()
- onBrushChanged()
- onClicked(BoxSet boxset)
- onCountChanged()
- onDoubleClicked(BoxSet boxset)
- onHovered(bool status, BoxSet boxset)
- onPenChanged()
- onPressed(BoxSet boxset)
- onReleased(BoxSet boxset)

## Methods

- append(BoxSet box)
- append(string label, VariantList values)
- clear()
- insert(int index, string label, VariantList values)
- remove(QBoxSet boxset)

## Detailed Description

A box plot series acts as a container for box-and-whiskers items. Items from multiple series are grouped into categories according to their index value.

The BarCategoryAxis class is used to add the categories to the chart's axis. Category labels have to be unique. If the same category label is defined for several box-and-whiskers items, only the first one is drawn.

The following QML code snippet shows how to create a simple box-and-whiskers chart:

      import QtQuick 2.0
      import QtCharts 2.0

      ChartView {
          title: "Box Plot series"
          width: 400
          height: 300
          theme: ChartView.ChartThemeBrownSand
          legend.alignment: Qt.AlignBottom

          BoxPlotSeries {
              id: plotSeries
              name: "Income"
              BoxSet { label: "Jan"; values: [3, 4, 5.1, 6.2, 8.5] }
              BoxSet { label: "Feb"; values: [5, 6, 7.5, 8.6, 11.8] }
              BoxSet { label: "Mar"; values: [3.2, 5, 5.7, 8, 9.2] }
              BoxSet { label: "Apr"; values: [3.8, 5, 6.4, 7, 8] }
              BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] }
          }
      }

See also BoxSet and BarCategoryAxis.

## Property Documentation

axisX : AbstractAxis

The x-axis used for the series. If you leave both axisX and axisXTop undefined, a BarCategoryAxis is created for the series.

See also axisXTop.

axisXTop : AbstractAxis

The x-axis used for the series, drawn on top of the chart view.

Note: You can only provide either axisX or axisXTop, but not both.

See also axisX and axisX.

axisY : AbstractAxis

The y-axis used for the series. If you leave both axisY and axisYRight undefined, a ValueAxis is created for the series.

See also axisYRight.

axisYRight : AbstractAxis

The y-axis used for the series, drawn to the right on the chart view.

Note: You can only provide either axisY or axisYRight, but not both.

See also axisY.

boxOutlineVisible : bool

The visibility of the box outline.

boxWidth : real

The width of the box-and-whiskers item. The value indicates the relative width of the item within its category. The value can be between 0.0 and 1.0. Negative values are replaced with 0.0 and values greater than 1.0 are replaced with 1.0.

brush : Brush

The brush used to fill the boxes of the box-and-whiskers items.

brushFilename : string

The name of the file used as a brush for the series.

count : int

The number of box-and-whiskers items in a box plot series.

pen : Pen

The pen used to draw the lines of the box-and-whiskers items.

## Signal Documentation

onAxisXChanged(AbstractAxis axis)

This signal is emitted when the x-axis changes to axis.

onAxisXTopChanged(AbstractAxis axis)

This signal is emitted when the top x-axis changes to axis.

onAxisYChanged(AbstractAxis axis)

This signal is emitted when the y-axis changes to axis.

onAxisYRightChanged(AbstractAxis axis)

This signal is emitted when the right y-axis changes to axis.

onBoxOutlineVisibilityChanged()

This signal is emitted when the box outline visibility changes.

onBoxWidthChanged()

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

onBoxsetsAdded()

This signal is emitted when new box-and-whiskers items are added to the series.

onBoxsetsRemoved()

This signal is emitted when box-and-whiskers items are removed from the series.

onBrushChanged()

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

onClicked(BoxSet boxset)

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

onCountChanged()

This signal is emitted when the number of box-and-whiskers items in the series changes.

onDoubleClicked(BoxSet boxset)

This signal is emitted when the user double-clicks the box-and-whiskers item specified by boxset in the chart.

onHovered(bool status, BoxSet boxset)

This signal is emitted when a mouse is hovered over the box-and-whiskers item specified by boxset in the 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 items changes.

onPressed(BoxSet boxset)

This signal is emitted when the user presses the boxset on the chart.

onReleased(BoxSet boxset)

This signal is emitted when the user releases the mouse press on the box-and-whiskers item specified by boxset in the chart.

## Method Documentation

append(BoxSet box)

Appends the box-and-whiskers item specified by box to the series.

append(string label, VariantList values)

Appends a new box-and-whiskers item with the label specified by label and the values specified by values to the series.

clear()

Removes all box-and-whiskers items from the series and permanently deletes them.

insert(int index, string label, VariantList values)

Inserts a new box-and-whiskers item with the label specified by label and the values specified by values to the series at the position specified by index.

remove(QBoxSet boxset)

Removes the box-and-whiskers item specified by boxset from the series.