QPercentBarSeries Class

The QPercentBarSeries class presents a series of categorized data as a percentage of each category. More...

Header: #include <QPercentBarSeries>
Instantiated By: PercentBarSeries
Inherits: QAbstractBarSeries

Public Functions

QPercentBarSeries(QObject *parent = nullptr)
virtual ~QPercentBarSeries()

Reimplemented Public Functions

virtual QAbstractSeries::SeriesType type() const override

Detailed Description

This class draws data as a series of uniformly sized vertically stacked bars, with one bar per category. Each bar set added to the series contributes a single segment to each stacked bar. The segment size corresponds to the percentage of the segment value compared with the total value of all segments in the stack. Bars with zero value are not drawn.

See the Charts with Widgets Gallery to learn how to create a percent bar chart.

See also QBarSet, QStackedBarSeries, and QAbstractBarSeries.

Member Function Documentation

[explicit] QPercentBarSeries::QPercentBarSeries(QObject *parent = nullptr)

Constructs an empty vertical percent bar series that is a QObject and a child of parent.

[virtual noexcept] QPercentBarSeries::~QPercentBarSeries()

Removes the bar series from the chart.

[override virtual] QAbstractSeries::SeriesType QPercentBarSeries::type() const

Reimplements an access function for property: QAbstractSeries::type.

Returns the vertical percent bar series.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.