DateTimeAxis QML Type

为图表的坐标轴添加日期和时间。更多

Import Statement: import QtCharts 2.9
In C++: QDateTimeAxis
Inherits:

AbstractAxis

属性

方法

详细说明

DateTimeAxis 类型可设置为显示带有刻度线、网格线和阴影的轴线。轴标签显示日期和时间,可通过设置适当的 DateTime 格式进行配置。

注意: 公元前 4714 年之前或公元 140 万年之后的任何日期都可能无法准确存储。

属性文档

format : string

格式字符串,用于从QDateTime 对象中创建轴标签。有关如何定义字符串的信息,请参阅QDateTime 文档。


max : datetime

轴上的最大值。

设置该属性时,必要时会调整最小值,以确保范围保持有效。


min : datetime

轴上的最小值。

设置此属性时,必要时会调整最大值,以确保范围保持有效。


tickCount : int

轴上刻度线的数量。


方法文档

rangeChanged(datetime min, datetime max)

minmax 指定的坐标轴最小值或最大值发生变化时,将发出此信号。

相应的信号处理器是onRangeChanged()


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