BarCategoryAxis QML Type
为图表的坐标轴添加类别。更多
Import Statement: | import QtCharts 2.9 |
In C++: | QBarCategoryAxis |
Inherits: |
属性
- categories : list<string>
- count : int
- max : string
- min : string
信号
- rangeChanged(string min, string max)
方法
- void clear()
详细说明
BarCategoryAxis 类型可设置为显示带有刻度线、网格线和阴影的轴线。在刻度线之间绘制类别。它也可用于线性系列。
以下 QML 代码段说明了如何使用 BarCategoryAxis:
ChartView { BarCategoryAxis { id: categoryAxis categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun" ] } // Add a few series... }
属性文档
count : int |
轴的类别数
max : string |
坐标轴上的最大值。
min : string |
轴上的最小值
信号 文档
当min 或max 轴的值发生变化时,将发出该信号。
相应的信号处理程序是onRangeChanged
。
注: 相应的处理程序是onRangeChanged
。
方法文档
void clear() |
删除所有类别。将轴范围的最大值和最小值设置为 QString::null。
© 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.