BarSet QML Type
代表条形图中的一组条形。更多
Import Statement: | import QtCharts 2.9 |
In C++: | QBarSet |
属性
- borderColor : color
- borderWidth : real
- brushFilename : string
- color : color
- count : int
- label : string
- labelColor : color
- labelFont : font
- values : list<var>
信号
- valueChanged(int index)
- valuesAdded(int index, int count)
- valuesRemoved(int index, int count)
方法
- append(real value)
- at(int index)
- clicked(int index)
- doubleClicked(int index)
- pressed(int index)
- released(int index)
- remove(int index, int count)
- replace(int index, real value)
详细说明
条形集包含每个类别的一个数据值。假设数据集的第一个值属于第一个类别,第二个值属于第二个类别,以此类推。如果数据集的数据值少于类别数,则缺失的数据值会被认为位于数据集的末尾。对于位于集合中间的缺失值,则使用数值 0。不显示零值集的标签。
另请参阅 AbstractBarSeries,BarSeries,StackedBarSeries,PercentBarSeries,HorizontalBarSeries,HorizontalStackedBarSeries, 和HorizontalPercentBarSeries 。
属性文档
borderColor : color |
条形图集的线(笔)颜色。
borderWidth : real |
边框线的宽度。默认宽度为 2.0。
brushFilename : string |
用作条形集笔刷的文件名。
color : color |
条形图组的填充(笔刷)颜色。
count : int |
条形图组中数值的个数。
label : string |
条形图组的标签。
labelColor : color |
条形集的文本(标签)颜色。
信号文档
valueChanged(int index) |
当index 指定位置的值被修改时,将发出该信号。
相应的信号处理程序是onValueChanged
。
注: 相应的处理程序是onValueChanged
。
index 表示第一个插入值的位置,count 是插入值的个数。
相应的信号处理程序是onValuesAdded
。
注: 相应的处理程序是onValuesAdded
。
index 表示第一个删除值的位置,count 是删除值的个数。
相应的信号处理程序是onValuesRemoved
。
注: 相应的处理程序是onValuesRemoved
。
方法文档
append(real value) |
将value 指定的新值添加到条形图集的末尾。
at(int index) |
从条形集中返回index 指定的值。如果索引超出范围,则返回 0.0。
clicked(int index) |
当用户点击条形图集中由index 指定的条形图时,就会发出该信号。
相应的信号处理程序是onClicked
。
doubleClicked(int index) |
当用户双击条形图集中由index 指定的条形图时,将发出该信号。
相应的信号处理程序是onDoubleClicked
。
pressed(int index) |
当用户点击条形图组中由index 指定的条形图并按住鼠标键时,将发出该信号。
相应的信号处理器是onPressed
。
released(int index) |
当用户在条形图集index 指定的条形图上松开鼠标键时,将发出该信号。
相应的信号处理程序是onReleased
。
© 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.