QBarDataItem Class | Qt Graphs | Qt 6.12.0
Description: The QBarDataItem class provides a container for resolved data to be added to bar graphs.
Keywords: class

- Qt 6.12
- Qt Graphs
- C++ Classes
- QtGraphs
- QBarDataItem
- Qt Graphs | Commercial or GPLv3

# QBarDataItem Class

The QBarDataItem class provides a container for resolved data to be added to bar graphs. More...

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

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

## Public Functions

| QBarDataItem()
| QBarDataItem(float value)
| QBarDataItem(float value, float angle)
float | rotation() const
void | setRotation(float angle)
void | setValue(float val)
float | value() const

## Detailed Description

A bar data item holds the data for a single rendered bar in a graph. Bar data proxies parse data into QBarDataItem instances for bar graphs.

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

## Member Function Documentation

### `[constexpr noexcept default]` QBarDataItem::QBarDataItem()

Constructs a bar data item.

### `[explicit constexpr noexcept]` QBarDataItem::QBarDataItem(float value)

Constructs a bar data item with the value value.

### `[explicit constexpr noexcept]` QBarDataItem::QBarDataItem(float value, float angle)

Constructs a bar data item with the value value and angle angle.

### `[constexpr noexcept]` float QBarDataItem::rotation() const

Returns the rotation angle in degrees for this data item.

See also setRotation().

### `[constexpr noexcept]` void QBarDataItem::setRotation(float angle)

Sets the rotation angle angle in degrees for this data item.

See also rotation().

### `[constexpr noexcept]` void QBarDataItem::setValue(float val)

Sets the value val to this data item.

See also value().

### `[constexpr noexcept]` float QBarDataItem::value() const

Returns the value of this data item.

See also setValue().