DateTimeAxis QML Type

Adds DateTime items to a graph's axis. More...

Import Statement: import QtGraphs
Instantiates: QDateTimeAxis
Inherits:

AbstractAxis

Properties

Signals

Detailed Description

A DateTime Axis can be used to display DateTime representations with tick marks and grid lines. The DateTime items on the axis are displayed at the position of the ticks.

The following example code illustrates how to use the DateTimeAxis type:

GraphsView {
    LineSeries {
        axisX: DateTimeAxis {
            min: new Date(2000,1,1)
            max: new Date(1970,1,1)
        }

        // Add a few XYPoint data...
    }
}

Property Documentation

labelFormat : string

The format of the DateTime labels on the axis The format property allows to signify the visual representation of the DateTime object, in days, months, and years. The default value is dd-MMMM-yy.


max : real

The maximum value on the axis.

This value can be lower or higher than the minimum. The default value is new Date(1980,1,1)


min : real

The minimum value on the axis.

This value can be lower or higher than the maximum. The default value is new Date(1970,1,1)


minorTickCount : int

The number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the graph. Labels are not drawn for minor ticks. The default value is 0.


tickInterval : real

The interval between dynamically placed tick marks and labels. The default value is 0, which means that intervals are automatically calculated based on the min and max range.


Signal Documentation

labelFormatChanged(string format)

This signal is emitted when the format of axis labels changes.

Note: The corresponding handler is onLabelFormatChanged.


maxChanged(DateTime max)

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

Note: The corresponding handler is onMaxChanged.


minChanged(DateTime min)

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

Note: The corresponding handler is onMinChanged.


minorTickCountChanged(int minorTickCount)

This signal is emitted when the number of minor tick marks on the axis, specified by minorTickCount, changes.

Note: The corresponding handler is onMinorTickCountChanged.


rangeChanged(real min, real max)

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

Note: The corresponding handler is onRangeChanged.


tickIntervalChanged(real tickInterval)

This signal is emitted when the tick interval value, specified by tickInterval, changes.

Note: The corresponding handler is onTickIntervalChanged.


© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.