- Qt 6.9
- Qt Graphs
- C++ Classes
- QtGraphs
- QScatterDataItem
- Qt Graphs | Commercial or GPLv3

# QScatterDataItem Class

The QScatterDataItem class provides a container for resolved data to be added to scatter graphs. More...

Header: | `#include <QScatterDataItem>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Graphs)` `target_link_libraries(mytarget PRIVATE Qt6::Graphs)`
qmake: | `QT += graphs`

- List of all members, including inherited members
- QScatterDataItem is part of Qt Graphs C++ Classes for 3D.

## Public Functions

| QScatterDataItem()
| QScatterDataItem(int position)
| QScatterDataItem(int position, const int &rotation)
| QScatterDataItem(float x, float y, float z)
int | position() const
int | rotation() const
void | setPosition(int pos)
void | setRotation(const int &rot)
void | setX(float value)
void | setY(float value)
void | setZ(float value)
float | x() const
float | y() const
float | z() const

## Detailed Description

A scatter data item holds the data for a single rendered item in a scatter graph. Scatter data proxies parse data into QScatterDataItem instances for scatter graphs.

See also QScatterDataProxy and Qt Graphs C++ Classes for 3D.

## Member Function Documentation

### `[constexpr noexcept]` QScatterDataItem::QScatterDataItem()

Default constructor for scatter data item.

### `[explicit noexcept]` QScatterDataItem::QScatterDataItem(int position)

Constructs scatter data item with position position.

### `[explicit noexcept]` QScatterDataItem::QScatterDataItem(int position, const int &rotation)

Constructs scatter data item with position position and rotation rotation.

### `[explicit noexcept]` QScatterDataItem::QScatterDataItem(float x, float y, float z)

Constructs a scatter data item at the position specified by x, y, and z.

### `[noexcept]` int QScatterDataItem::position() const

Returns the position of this data item.

See also setPosition().

### int QScatterDataItem::rotation() const

Returns the rotation of this data item.

See also setRotation().

### `[noexcept]` void QScatterDataItem::setPosition(int pos)

Sets the position pos for this data item.

See also position().

### `[noexcept]` void QScatterDataItem::setRotation(const int &rot)

Sets the rotation rot for this data item. The value of rot should be a normalized QQuaternion. If the series also has rotation, item rotation is multiplied by it. Defaults to no rotation.

See also rotation().

### `[noexcept]` void QScatterDataItem::setX(float value)

Sets the x-coordinate of the item position to the value value.

See also x().

### `[noexcept]` void QScatterDataItem::setY(float value)

Sets the y-coordinate of the item position to the value value.

See also y().

### `[noexcept]` void QScatterDataItem::setZ(float value)

Sets the z-coordinate of the item position to the value value.

See also z().

### `[noexcept]` float QScatterDataItem::x() const

Returns the x-coordinate of the position of this data item.

See also setX().

### `[noexcept]` float QScatterDataItem::y() const

Returns the y-coordinate of the position of this data item.

See also setY().

### `[noexcept]` float QScatterDataItem::z() const

Returns the z-coordinate of the position of this data item.

See also setZ().