AbstractAxis QML Type
用于专用轴类型的基类。更多...
| Import Statement: | import QtCharts 2.12 |
| In C++: | QAbstractAxis |
| Inherited By: | BarCategoryAxis, CategoryAxis, DateTimeAxis, LogValueAxis, and ValueAxis |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
- alignment : alignment
- color : color
- gridLineColor : color
- gridVisible : bool
- labelsAngle : int
- labelsColor : color
- labelsFont : font
- labelsTruncated : int
- labelsVisible : bool
- lineVisible : bool
- minorGridLineColor : color
- minorGridVisible : bool
- orientation : Qt.Orientation
- reverse : alignment
- shadesBorderColor : color
- shadesColor : color
- shadesVisible : bool
- titleFont : font
- titleText : string
- titleVisible : bool
- truncateLabels : int
- visible : bool
详细说明
每个系列只能绑定到一条水平轴和一条垂直轴。
可以单独控制各种坐标轴元素(如坐标轴线、标题、标签、网格线和阴影)的属性和可见性。
属性文档
alignment : alignment [read-only]
轴的对齐方式。可以是Qt.AlignLeft 、Qt.AlignRight 、Qt.AlignBottom 或Qt.AlignTop 。
color : color
坐标轴和刻度的颜色。
gridLineColor : color
网格线的颜色。
gridVisible : bool
网格线的可见性。
labelsAngle : int
轴标签的角度(单位:度)。
labelsColor : color
坐标轴标签的颜色。
labelsFont : font
坐标轴标签的字体。
有关更多信息,请参阅font 。
labelsTruncated : int [read-only]
如果轴上至少有一个标签被截断,则返回true 。
在轴显示之前,返回值不会是精确的。
labelsVisible : bool
轴标签的可见性。
lineVisible : bool
轴线的可见性。
minorGridLineColor : color
次要网格线的颜色。
仅适用于支持次要网格线的坐标轴。
minorGridVisible : bool
次级网格线的可见性。仅适用于支持次级网格线的坐标轴。
orientation : Qt.Orientation [read-only]
坐标轴的方向。当坐标轴被设置为一个系列时,其方向固定为Qt.Horizontal 或Qt.Vertical 。
reverse : alignment
用于指定是否使用反向坐标轴。默认情况下,该值为false 。
线型、样条线和散点型数据系列,以及笛卡尔坐标系中的面积型数据系列均支持反向坐标轴。如果同一数据系列关联的多个坐标轴中存在一个反向坐标轴,则所有方向相同的坐标轴都必须反向,否则行为将无法确定。
shadesBorderColor : color
坐标轴阴影区域的边框(笔触)颜色。
shadesColor : color
坐标轴阴影的填充(笔刷)颜色。
shadesVisible : bool
轴阴影的可见性。
titleFont : font
坐标轴标题的字体。
titleText : string
坐标轴的标题。默认留空。坐标轴标题支持 HTML 格式。
titleVisible : bool
轴标题的可见性。默认情况下,该值为true 。
truncateLabels : int
标签的截断状态。
用于指定当空间不足以显示完整文本时,是否应截断标签。默认值为true 。
visible : bool
轴的可见性。
© 2026 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.