VXYModelMapper QML Type | Qt Charts 5.7

Qt 5.7 | Qt Charts | QML Types | VXYModelMapper QML Type

Qt 5.7.0 Reference Documentation

# VXYModelMapper QML Type

Vertical model mapper for QXYSeries. More...

Import Statement: | import QtCharts 2.1
Instantiates: | QVXYModelMapper

- List of all members, including inherited members

## Properties

- columnCount : int
- firstRow : int
- model : SomeModel
- series : XYSeries
- xColumn : int
- yColumn : int

## Detailed Description

VXYModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source for XYSeries based series. It is possible to use both QAbstractItemModel and XYSeries data API to manipulate data. VXYModelMapper keeps the series and the model in sync.

## Property Documentation

columnCount : int

Defines the number of rows of the model that are mapped as the data for series. The default value is -1 (count limited by the number of rows in the model).

firstRow : int

Defines which row of the model contains the data for the first point of 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 : XYSeries

Defines the XYSeries 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).

xColumn : int

Defines which column of the model is kept in sync with the x values of the series. Default value is -1 (invalid mapping).

yColumn : int

Defines which column of the model is kept in sync with the y values of the series. Default value is -1 (invalid mapping).