VBoxPlotModelMapper QML Type | Qt Charts 5.7

Qt 5.7 | Qt Charts | QML Types | VBoxPlotModelMapper QML Type

Qt 5.7.1 Reference Documentation

# VBoxPlotModelMapper QML Type

Vertical model mapper for box plot series. More...

Import Statement: | import QtCharts 2.1
Instantiates: | QVBoxPlotModelMapper

- List of all members, including inherited members

## Properties

- firstRow : int
- model : SomeModel
- series : AbstractBarSeries

## Detailed Description

VBoxPlotModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source for any box-and-whiskers series. It is possible to use both QAbstractItemModel and box-and-whiskers series data API to manipulate data. VBoxPlotModelMapper keeps the series and the model in sync.

The following QML example would create a box-and-whiskers series with three box sets (assuming the model has at least four columns). Each box set would contain data starting from row 1. The name of a set would be defined by the horizontal header (of the column).

      BoxPlotSeries {
          VBoxPlotModelMapper {
              model: myCustomModel // QAbstractItemModel derived implementation
              firstBoxSetColumn: 1
              lastBoxSetColumn: 3
              firstRow: 1
          }
      }

## Property Documentation

firstRow : int

Defines which row of the model contains the first values of the QBoxSets in the series. The default value is 0.

model : SomeModel

The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to QML.

Note: the model has to support adding/removing rows/columns and modifying the data of the cells.

series : AbstractBarSeries

Defines the AbstractBarSeries based object that is used by the mapper. All the data in the series is discarded when it is set to the mapper. When new series is specified the old series is disconnected (it preserves its data).