Skip to content

BarCategoryAxis

Qt Base Class: QBarCategoryAxis

Signature: QBarCategoryAxis(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
AbstractAxisMixin
prettyqt.charts.abstractaxis
QBarCategoryAxis
PySide6.QtCharts
QBarCategoryAxis(self, parent: Optional[PySide6.QtCore.QObject] \= None) -> None

⋔ Inheritance diagram

graph TD
  1473367669312["charts.BarCategoryAxis"]
  1473367646864["charts.AbstractAxisMixin"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473367651744["QtCharts.QBarCategoryAxis"]
  1473367634176["QtCharts.QAbstractAxis"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473367646864 --> 1473367669312
  1473299815024 --> 1473367646864
  140713234304496 --> 1473299815024
  1473367651744 --> 1473367669312
  1473367634176 --> 1473367651744
  1473288842240 --> 1473367634176
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: AbstractAxisMixin, QBarCategoryAxis

Source code in prettyqt\charts\barcategoryaxis.py
class BarCategoryAxis(charts.AbstractAxisMixin, charts.QBarCategoryAxis):
    def __delitem__(self, index: str):
        """Remove category."""
        self.remove(index)

    def __getitem__(self, index: int) -> str:
        """Return category for given index."""
        return self.categories()[index]

    def __setitem__(self, index: str, value: str):
        """Set category at given index to value."""
        self.replace(index, value)

    def __add__(self, other: str) -> BarCategoryAxis:
        """Append another category to axis."""
        self.append(other)
        return self

__add__(other: str) -> BarCategoryAxis

Append another category to axis.

Source code in prettyqt\charts\barcategoryaxis.py
def __add__(self, other: str) -> BarCategoryAxis:
    """Append another category to axis."""
    self.append(other)
    return self

__delitem__(index: str)

Remove category.

Source code in prettyqt\charts\barcategoryaxis.py
7
8
9
def __delitem__(self, index: str):
    """Remove category."""
    self.remove(index)

__getitem__(index: int) -> str

Return category for given index.

Source code in prettyqt\charts\barcategoryaxis.py
def __getitem__(self, index: int) -> str:
    """Return category for given index."""
    return self.categories()[index]

__setitem__(index: str, value: str)

Set category at given index to value.

Source code in prettyqt\charts\barcategoryaxis.py
def __setitem__(self, index: str, value: str):
    """Set category at given index to value."""
    self.replace(index, value)

⌗ Property table

Qt Property Type Doc
objectName QString
visible bool
lineVisible bool
linePen QPen
color QColor
labelsVisible bool
labelsBrush QBrush
labelsAngle int
labelsFont QFont
labelsColor QColor
labelsTruncated bool
truncateLabels bool
gridVisible bool
gridLinePen QPen
minorGridVisible bool
minorGridLinePen QPen
gridLineColor QColor
minorGridLineColor QColor
shadesVisible bool
shadesColor QColor
shadesBorderColor QColor
shadesPen QPen
shadesBrush QBrush
titleText QString
titleBrush QBrush
titleVisible bool
titleFont QFont
orientation Qt::Orientation
alignment QFlags
reverse bool
categories QStringList
min QString
max QString
count int