- Qt 6.11
- Qt Graphs
- C++ Classes
- QtGraphs
- QCustomSeries
- Qt Graphs | Commercial or GPLv3

# QCustomSeries Class

The QCustomSeries class allows presenting customized graph types. More...

Header: | `#include <QCustomSeries>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Graphs)` `target_link_libraries(mytarget PRIVATE Qt6::Graphs)`
qmake: | `QT += graphs`
Since: | Qt 6.11
In QML: | CustomSeries
Inherits: | QAbstractSeries

- List of all members, including inherited members

## Properties

- delegate : QQmlComponent*

## Public Functions

void | append()
void | append(const QVariantMap &data)
void | clear()
QQmlComponent * | delegate() const
void | insert(qsizetype index)
void | insert(qsizetype index, const QVariantMap &data)
qreal | mapX(qreal x)
qreal | mapY(qreal y)
void | remove(qsizetype index)
void | setDelegate(QQmlComponent *newDelegate)

## Reimplemented Public Functions

virtual QAbstractSeries::SeriesType | type() const override

## Signals

void | delegateChanged()

## Protected Functions

virtual void | updateDelegate(QQuickItem *item, qsizetype index)

## Reimplemented Protected Functions

virtual void | componentComplete() override
virtual bool | event(QEvent *event) override

## Detailed Description

## Property Documentation

### delegate : QQmlComponent*

The delegate is used to insert elements to QML corresponding to provided custom data. Data is defined in the CustomSeries itself and given to the delegated elements through the "data" property.

Access functions:

QQmlComponent * | delegate() const
void | setDelegate(QQmlComponent *newDelegate)

Notifier signal:

void | delegateChanged()

## Member Function Documentation

### `[invokable]` void QCustomSeries::append()

Appends an empty data item to the series.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` void QCustomSeries::append(const QVariantMap &data)

Appends a data item defined by data to the series.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` void QCustomSeries::clear()

Clear all data items.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` void QCustomSeries::insert(qsizetype index)

Appends an empty data item to the series at position index.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` void QCustomSeries::insert(qsizetype index, const QVariantMap &data)

Appends a data item defined by data to the series at position index.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` qreal QCustomSeries::mapX(qreal x)

Returns x axis-space coordinate converted into render-space.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` qreal QCustomSeries::mapY(qreal y)

Returns y axis-space coordinate converted into render-space.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` void QCustomSeries::remove(qsizetype index)

Remove a data item at position index.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[virtual protected]` void QCustomSeries::updateDelegate(QQuickItem *item, qsizetype index)

Called by the graph renderer to give access to the item representing the data, and the index corresponding to the data item.

Override to implement custom property values for QQuickItem instance(s).