Skip to content

DateTimeAxis

Qt Base Class: QDateTimeAxis

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

Base classes

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

⋔ Inheritance diagram

graph TD
  1473367663456["charts.DateTimeAxis"]
  1473367646864["charts.AbstractAxisMixin"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473367639056["QtCharts.QDateTimeAxis"]
  1473367634176["QtCharts.QAbstractAxis"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473367646864 --> 1473367663456
  1473299815024 --> 1473367646864
  140713234304496 --> 1473299815024
  1473367639056 --> 1473367663456
  1473367634176 --> 1473367639056
  1473288842240 --> 1473367634176
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: AbstractAxisMixin, QDateTimeAxis

Source code in prettyqt\charts\datetimeaxis.py
class DateTimeAxis(charts.AbstractAxisMixin, charts.QDateTimeAxis):
    def set_min(self, minimum: datatypes.DateTimeType):
        """Set minimum value for axis."""
        minimum = datatypes.to_datetime(minimum)
        self.setMin(minimum)

    def get_min(self) -> datetime.datetime:
        return self.min().toPython()

    def set_max(self, maximum: datatypes.DateTimeType):
        """Set maximum value for axis."""
        maximum = datatypes.to_datetime(maximum)
        self.setMax(maximum)

    def get_max(self) -> datetime.datetime:
        return self.max().toPython()

    def set_range(self, minimum: datatypes.DateTimeType, maximum: datatypes.DateTimeType):
        """Set value range of datetime axis."""
        self.setRange(datatypes.to_datetime(minimum), datatypes.to_datetime(maximum))

set_max(maximum: datatypes.DateTimeType)

Set maximum value for axis.

Source code in prettyqt\charts\datetimeaxis.py
def set_max(self, maximum: datatypes.DateTimeType):
    """Set maximum value for axis."""
    maximum = datatypes.to_datetime(maximum)
    self.setMax(maximum)

set_min(minimum: datatypes.DateTimeType)

Set minimum value for axis.

Source code in prettyqt\charts\datetimeaxis.py
def set_min(self, minimum: datatypes.DateTimeType):
    """Set minimum value for axis."""
    minimum = datatypes.to_datetime(minimum)
    self.setMin(minimum)

set_range(minimum: datatypes.DateTimeType, maximum: datatypes.DateTimeType)

Set value range of datetime axis.

Source code in prettyqt\charts\datetimeaxis.py
def set_range(self, minimum: datatypes.DateTimeType, maximum: datatypes.DateTimeType):
    """Set value range of datetime axis."""
    self.setRange(datatypes.to_datetime(minimum), datatypes.to_datetime(maximum))

⌗ 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
tickCount int
min QDateTime
max QDateTime
format QString