QBar3DSeries Class

The QBar3DSeries class represents a data series in a 3D bar graph. More...

Header: #include <QBar3DSeries>
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
Instantiated By: Bar3DSeries
Inherits: QAbstract3DSeries

This class was introduced in QtDataVisualization 1.0.

Properties

Public Functions

QBarDataProxy *dataProxy() const
float meshAngle() const
QPoint selectedBar() const
void setDataProxy(QBarDataProxy *proxy)
void setMeshAngle(float angle)
void setSelectedBar(const QPoint &position)

Signals

void dataProxyChanged(QBarDataProxy *proxy)
void meshAngleChanged(float angle)
void selectedBarChanged(const QPoint &position)

Detailed Description

This class manages the series specific visual elements, as well as the series data (via a 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.

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

@rowTitleTitle from row axis
@colTitleTitle from column axis
@valueTitleTitle from value axis
@rowIdxVisible row index. Localized using the graph locale.
@colIdxVisible column index. Localized using the graph locale.
@rowLabelLabel from row axis
@colLabelLabel from column axis
@valueLabelItem value formatted using the format of the value axis attached to the graph. For more information, see QValue3DAxis::labelFormat.
@seriesNameName of the series
%<format spec>Item value in the specified format. Formatted using the same rules as QValue3DAxis::labelFormat.

For example:

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

See also Qt Data Visualization Data Handling and QAbstract3DGraph::locale.

Property Documentation

dataProxy : QBarDataProxy*

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:

QBarDataProxy *dataProxy() const
void setDataProxy(QBarDataProxy *proxy)

Notifier signal:

void dataProxyChanged(QBarDataProxy *proxy)

meshAngle : float

This property holds the series rotation angle in degrees.

Setting this property is equivalent to the following call:

 setMeshRotation(QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, angle))

Note: When reading this property, it is calculated from the QAbstract3DSeries::meshRotation value using floating point precision and always returns a value from zero to 360 degrees.

Access functions:

float meshAngle() const
void setMeshAngle(float angle)

Notifier signal:

void meshAngleChanged(float angle)

See also QAbstract3DSeries::meshRotation.

selectedBar : QPoint

This property holds the bar in the series that is selected.

Access functions:

QPoint selectedBar() const
void setSelectedBar(const QPoint &position)

Notifier signal:

void selectedBarChanged(const QPoint &position)