- Qt 6.12
- Qt Charts
- QML Types
- DateTimeAxis
- Qt Charts | Commercial or GPLv3

# DateTimeAxis QML Type

Adds dates and times to a chart's axis. More...

Import Statement: | `import QtCharts 2.12`
In C++: | QDateTimeAxis
Inherits: | AbstractAxis
Status: | Deprecated

This type is deprecated. We strongly advise against using it in new code.

- List of all members, including inherited members

## Properties

- format : string
- max : datetime
- min : datetime
- tickCount : int

## Signals

- rangeChanged(datetime min, datetime max)

## Detailed Description

The DateTimeAxis type can be set up to show an axis line with tick marks, grid lines, and shades. The axis labels display dates and times and can be configured by setting an appropriate DateTime format.

Note: Any date before 4714 BCE or after about 1.4 million CE may not be accurately stored.

## Property Documentation

### format : string

The format string that is used when creating the label for the axis out of a QDateTime object. See QDateTime documentation for information on how the string should be defined.

### max : datetime

The maximum value on the axis.

When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid.

### min : datetime

The minimum value on the axis.

When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid.

### tickCount : int

The number of tick marks on the axis.

## Signal Documentation

### rangeChanged(datetime min, datetime max)

This signal is emitted when the minimum or maximum value of the axis, specified by min and max, changes.

The corresponding signal handler is `onRangeChanged()`.

Note: The corresponding handler is `onRangeChanged`.