- Qt 6.10
- 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.10`
In C++: | QDateTimeAxis
Inherits: | AbstractAxis

- List of all members, including inherited members

## Properties

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

## Methods

- 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.

## Method 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()`.