DateTimeAxis QML Type

Adds DateTime items to a graph's axis. 更多...

import 语句: import QtGraphs
在 C++: QDateTimeAxis
继承:

AbstractAxis

特性

信号

详细描述

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 {
    axisX: DateTimeAxis {
        min: new Date(2000,1,1)
        max: new Date(1970,1,1)
    }
    LineSeries {
        // Add a few XYPoint data...
    }
}
					

特性文档编制

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 DateTime is stored as UTC internally. 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 DateTime is stored as UTC internally. The default value is new Date(1970,1,1)

subTickCount : int

The number of subticks on the axis. This indicates how many subticks are drawn between major lines on the graph. Labels are not drawn for subticks. 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.

信号文档编制

labelFormatChanged ( string format )

此信号发射,当 format 对于轴标签改变。

注意: 相应处理程序是 onLabelFormatChanged .

maxChanged ( DateTime max )

This signal is emitted when the maximum value of the axis, specified by max ,改变。

注意: 相应处理程序是 onMaxChanged .

minChanged ( DateTime min )

This signal is emitted when the minimum value of the axis, specified by min ,改变。

注意: 相应处理程序是 onMinChanged .

rangeChanged ( real min , real max )

This signal is emitted when the minimum or maximum value of the axis, specified by min and max ,改变。

注意: 相应处理程序是 onRangeChanged .

subTickCountChanged ( int subTickCount )

This signal is emitted when the number of subticks on the axis, specified by subTickCount ,改变。

注意: 相应处理程序是 onSubTickCountChanged .

tickIntervalChanged ( real tickInterval )

This signal is emitted when the tick interval value, specified by tickInterval ,改变。

注意: 相应处理程序是 onTickIntervalChanged .