QPercentBarSeries Class

QPercentBarSeries 类以每个类别的百分比来显示一系列分类数据。更多

Header: #include <QPercentBarSeries>
In QML: PercentBarSeries
Inherits: QAbstractBarSeries

公共函数

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

重新实现的公共函数

virtual QAbstractSeries::SeriesType type() const override

详细描述

该类将数据绘制为一系列大小一致的垂直堆叠条形图,每个类别一个条形图。添加到系列中的每个条形集都会为每个堆叠条形提供一个段。段的大小与段值占堆栈中所有段总值的百分比相对应。不绘制数值为零的条形图。

请参阅图表与小工具图库,了解如何创建百分比柱形图。

另请参阅 QBarSet,QStackedBarSeries, 和QAbstractBarSeries

成员函数文档

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

构建一个空的垂直百分率条形数列,该数列是QObjectparent 的子数列。

[virtual noexcept] QPercentBarSeries::~QPercentBarSeries()

从图表中删除条形序列。

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

重新实现属性:QAbstractSeries::type 的访问函数。

返回垂直百分比条形序列。

© 2025 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.