Qt 5.7 | Qt Data Visualization | C++ Classes | QScatter3DSeries

Qt 5.7.1 Reference Documentation

# QScatter3DSeries Class

Base series class for Q3DScatter. More...

Header: | #include <QScatter3DSeries>
Since: | QtDataVisualization 1.0
Instantiated By: | Scatter3DSeries
Inherits: | QAbstract3DSeries

- List of all members, including inherited members

## Properties

- dataProxy : QScatterDataProxy *
- itemSize : float
- selectedItem : int

- 17 properties inherited from QAbstract3DSeries

## Public Functions

| QScatter3DSeries(QObject *parent = Q_NULLPTR)
| QScatter3DSeries(QScatterDataProxy *dataProxy, QObject *parent = Q_NULLPTR)
virtual | ~QScatter3DSeries()
QScatterDataProxy * | dataProxy() const
float | itemSize() const
int | selectedItem() const
void | setDataProxy(QScatterDataProxy *proxy)
void | setItemSize(float size)
void | setSelectedItem(int index)

- 33 public functions inherited from QAbstract3DSeries

## Signals

void | dataProxyChanged(QScatterDataProxy *proxy)
void | itemSizeChanged(float size)
void | selectedItemChanged(int index)

- 16 signals inherited from QAbstract3DSeries

## Static Public Members

int | invalidSelectionIndex()

## Detailed Description

Base series class for Q3DScatter.

QScatter3DSeries manages the series specific visual elements, as well as series data (via data proxy).

If no data proxy is set explicitly for the series, the series creates a default proxy. Setting another proxy will destroy the existing proxy and all data added to it.

QScatter3DSeries supports the following format tags for QAbstract3DSeries::setItemLabelFormat():

@xTitle | Title from X axis
@yTitle | Title from Y axis
@zTitle | Title from Z axis
@xLabel | Item value formatted using the same format the X axis attached to the graph uses, see QValue3DAxis::setLabelFormat() for more information.
@yLabel | Item value formatted using the same format the Y axis attached to the graph uses, see QValue3DAxis::setLabelFormat() for more information.
@zLabel | Item value formatted using the same format the Z axis attached to the graph uses, see QValue3DAxis::setLabelFormat() for more information.
@seriesName | Name of the series

For example:

      proxy->setItemLabelFormat(QStringLiteral("@valueTitle for (@rowLabel, @colLabel): %.1f"));

See also Qt Data Visualization Data Handling.

## Property Documentation

### dataProxy : QScatterDataProxy *

This property holds the active data proxy. The series assumes ownership of any proxy set to it and deletes any previously set proxy when a new one is added. The proxy cannot be null or set to another series.

Access functions:

QScatterDataProxy * | dataProxy() const
void | setDataProxy(QScatterDataProxy *proxy)

Notifier signal:

void | dataProxyChanged(QScatterDataProxy *proxy)

### itemSize : float

Set item size for the series. Size must be between 0.0f and 1.0f. Setting the size to 0.0f causes item size to be automatically scaled based on combined item count in all the series for the graph. Preset default is `0.0f`.

Access functions:

float | itemSize() const
void | setItemSize(float size)

Notifier signal:

void | itemSizeChanged(float size)

### selectedItem : int

Selects an item at the index. The index is the index in the data array of the series. Only one item can be selected at a time. To clear selection from this series, set invalidSelectionIndex() as the index. If this series is added to a graph, the graph can adjust the selection according to user interaction or if it becomes invalid. Selecting an item on another added series will also clear the selection. Removing items from or inserting items to the series before the selected item will adjust the selection so that the same item will stay selected.

Access functions:

int | selectedItem() const
void | setSelectedItem(int index)

Notifier signal:

void | selectedItemChanged(int index)

See also QAbstract3DGraph::clearSelection().

## Member Function Documentation

### QScatter3DSeries::QScatter3DSeries(QObject *parent = Q_NULLPTR)

Constructs QScatter3DSeries with the given parent.

### QScatter3DSeries::QScatter3DSeries(QScatterDataProxy *dataProxy, QObject *parent = Q_NULLPTR)

Constructs QScatter3DSeries with the given dataProxy and the parent.

### `[virtual]` QScatter3DSeries::~QScatter3DSeries()

Destroys QScatter3DSeries.

### `[static]` int QScatter3DSeries::invalidSelectionIndex()

Returns an invalid index for selection. Set this index to selectedItem property if you want to clear the selection from this series.

See also QAbstract3DGraph::clearSelection().