AbstractAxis QML Type
用于特殊轴类型的基本类型。更多
| Import Statement: | import QtCharts 2.11 |
| In C++: | QAbstractAxis |
| Inherited By: | BarCategoryAxis, CategoryAxis, DateTimeAxis, LogValueAxis, and ValueAxis |
属性
- 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.