Adds categories to a graph's axes. 更多...
import 语句: | import QtGraphs |
实例化: | QBarCategoryAxis |
继承: | |
状态: | 技术预览 |
The BarCategoryAxis type can be set up to show an axis line with tick marks, grid lines, and shades. Categories are drawn between the ticks.
The following QML snippet illustrates how to use BarCategoryAxis:
GraphsView { anchors.fill: parent BarSeries { axisX: BarCategoryAxis { categories: ["2023", "2024", "2025"] lineVisible: false } axisY: ValueAxis { } BarSet { values: [7, 6, 9] } } }
categories : list |
The categories of an axis.
count
:
int
|
The number of categories of an axis.
max : string |
The maximum value on the axis.
min : string |
The minimum value on the axis.
此信号发射当 min or max value of the axis changes.
The corresponding signal handler is
onRangeChanged
.
注意:
相应处理程序是
onRangeChanged
.
void clear () |
Removes all categories. Sets the maximum and minimum values of the axis range to QString::null.