PySide6.QtGraphs.QBarCategoryAxis¶
- class QBarCategoryAxis¶
- The - QBarCategoryAxisclass adds categories to a graph’s axes. More…- Synopsis¶- Properties¶- categoriesᅟ- Of an axis
- countᅟ- Number of categories of an axis
- maxᅟ- Maximum value on the axis
- minᅟ- Minimum value on the axis
 - Methods¶- def - __init__()
- def - append()
- def - at()
- def - categories()
- def - clear()
- def - count()
- def - insert()
- def - max()
- def - min()
- def - remove()
- def - replace()
- def - setCategories()
- def - setMax()
- def - setMin()
- def - setRange()
 - Signals¶
- def - countChanged()
- def - maxChanged()
- def - minChanged()
- def - rangeChanged()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- QBarCategoryAxiscan be set up to show an axis line with tick marks, grid lines, and shades. Categories are drawn between the ticks.- Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property categoriesᅟ: list of strings¶
 - This property holds The categories of an axis.. - Access functions:
 - property countᅟ: int¶
 - This property holds The number of categories of an axis.. - Access functions:
- Signal - countChanged()
 
 - property maxᅟ: str¶
 - This property holds The maximum value on the axis.. - The maximum value on the axis. The given value should be contained in - categories.- Access functions:
- Signal - maxChanged()
 
 - property minᅟ: str¶
 - This property holds The minimum value on the axis.. - The minimum value on the axis. The given value should be contained in - categories.- Access functions:
- Signal - minChanged()
 
 - Constructs an axis object that is the child of - parent.- append(category)¶
- Parameters:
- category – str 
 
 - Appends - categoryto an axis. The maximum value on the axis will be changed to match the last- category. If no categories were previously defined, the minimum value on the axis will also be changed to match- category.- A category has to be a valid QString and it cannot be duplicated. Duplicated categories will not be appended. - append(categories)
- Parameters:
- categories – list of strings 
 
 - Appends - categoriesto an axis. The maximum value on the axis will be changed to match the last category in- categories. If no categories were previously defined, the minimum value on the axis will also be changed to match the first category in- categories.- A category has to be a valid QString and it cannot be duplicated. Duplicated categories will not be appended. - at(index)¶
- Parameters:
- index – int 
- Return type:
- str 
 
 - Returns the category at - index.- categories()¶
- Return type:
- list of strings 
 
 - Returns categories. - See also - Getter of property - categoriesᅟ.- categoriesChanged()¶
 - Notification signal of property - categoriesᅟ.- clear()¶
 - Removes all categories. Sets the maximum and minimum values of the axis range to QString::null. - count()¶
- Return type:
- int 
 
 - Returns the number of categories. - Getter of property - countᅟ.- countChanged()¶
 - Notification signal of property - countᅟ.- insert(index, category)¶
- Parameters:
- index – int 
- category – str 
 
 
 - Inserts - categoryto the axis at- index.- categoryhas to be a valid QString and it cannot be duplicated. If- categoryis prepended or appended to other categories, the minimum and maximum values on the axis are updated accordingly.- max()¶
- Return type:
- str 
 
 - Returns the maximum category. - See also - Getter of property - maxᅟ.- maxChanged(max)¶
- Parameters:
- max – str 
 
 - Notification signal of property - maxᅟ.- min()¶
- Return type:
- str 
 
 - Returns the minimum category. - See also - Getter of property - minᅟ.- minChanged(min)¶
- Parameters:
- min – str 
 
 - Notification signal of property - minᅟ.- rangeChanged(min, max)¶
- Parameters:
- min – str 
- max – str 
 
 
 - remove(category)¶
- Parameters:
- category – str 
 
 - Removes - categoryfrom the axis. Removing a category that currently sets the maximum or minimum value on the axis will affect the axis range.- replace(oldCategory, newCategory)¶
- Parameters:
- oldCategory – str 
- newCategory – str 
 
 
 - Replaces - oldCategorywith- newCategory. If- oldCategorydoes not exist on the axis, nothing is done.- newCategoryhas to be a valid QString and it cannot be duplicated. If the minimum or maximum category is replaced, the minimum and maximum values on the axis are updated accordingly.- setCategories(categories)¶
- Parameters:
- categories – list of strings 
 
 - Sets - categoriesand discards the old ones. The axis range is adjusted to match the first and last category in- categories.- A category has to be a valid QString and it cannot be duplicated. - See also - Setter of property - categoriesᅟ.- setMax(maxCategory)¶
- Parameters:
- maxCategory – str 
 
 - Sets the maximum category to - max.- See also - Setter of property - maxᅟ.- setMin(minCategory)¶
- Parameters:
- minCategory – str 
 
 - Sets the minimum category to - min.- See also - Setter of property - minᅟ.- setRange(minCategory, maxCategory)¶
- Parameters:
- minCategory – str 
- maxCategory – str 
 
 
 - Sets the axis range from - minCategoryto- maxCategory.