BoxPlotSeries QML Type
Series for creating box-and-whiskers chart. More...
Import Statement: | import QtCharts 2.1 |
Instantiates: | QBoxPlotSeries |
Inherits: |
Properties
- axisX : AbstractAxis
- axisXTop : AbstractAxis
- axisY : AbstractAxis
- axisYRight : AbstractAxis
- boxOutlineVisible : bool
- boxWidth : qreal
- brush : Brush
- 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
BoxPlotSeries represents a series of data shown as box-and-whiskers bars. The purpose of this class is to act as a container for single box-and-whiskers items. Each item is drawn to own slot. If chart includes multiple instances of BoxPlotSeries then box-and-whiskers items with the same index are drawn to same slot.
Note: The slot, each item in BoxPlotSeries is drawn, represents a category in BarCategoryAxis. The category labels have to be unique. If same category label is defined for several box-and-whisker items only the first one is drawn.
The following QML 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 |
axisXTop : AbstractAxis |
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 |
This property configures the width of the box-and-whiskers item. The value signifies the relative width of the box-and-whiskers item inside its own slot. The value can between 0.0 and 1.0. Negative values are clamped to 0.0 and values over 1.0 are clamped to 1.0.
Signal Documentation
onAxisXChanged(AbstractAxis axis) |
Signal is emitted when there is change in X axis.
onAxisXTopChanged(AbstractAxis axis) |
Signal is emitted when there is change in top X axis.
onAxisYChanged(AbstractAxis axis) |
Signal is emitted when there is change in Y axis.
onAxisYRightChanged(AbstractAxis axis) |
Signal is emitted when there is change in Y right axis.
Signal is emitted when the middle box outline visibility is changed.
onClicked(BoxSet boxset) |
Signal is emitted when the user clicks the boxset on the chart.
Signal is emitted when there is change in count of box-and-whiskers items in the series.
onDoubleClicked(BoxSet boxset) |
This signal is emitted when the user doubleclicks the boxset on the chart.
onHovered(bool status, BoxSet boxset) |
Signal is emitted when there is change in hover status over boxset.
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 boxset on the chart.
Method Documentation
append(BoxSet box) |
Appends the box to the series.
Appends a new box-and-whiskers set with label and values to the series.
Inserts a new box-and-whiskers set with label and values at the index position.