LogValueAxis QML Type
为图表的坐标轴添加对数刻度。更多
Import Statement: | import QtCharts 2.9 |
In C++: | QLogValueAxis |
Inherits: |
属性
- base : real
- labelFormat : string
- max : real
- min : real
- minorTickCount : int
- tickCount : int
信号
- minorTickCountChanged(int minorTickCount)
- tickCountChanged(int tickCount)
详细说明
对数刻度是一种基于数量级的非线性刻度,因此坐标轴上的每个刻度都是前一个刻度乘以一个值。
注: 如果在一个序列上附加了 LogValueAxis 类型,而该序列的相关维度上有一个或多个点的值为负或零,则根本无法绘制该序列。这一点在使用 XYModelMappers 时尤为重要,因为模型中的空单元格通常包含零值。
属性文档
base : real |
对数的底数。
该值必须大于 0 且不能等于 1。
labelFormat : string |
坐标轴的标签格式。
格式字符串支持printf()
在标准 C++ 库中提供的以下转换规范、长度修饰符和标志:d、i、o、x、X、f、F、e、E、g、G、c。
如果ChartView.localizeNumbers 是true
,支持的指定符仅限于:d、e、E、f、g、G 和 i。此外,只支持精度修饰符。其余格式来自应用程序的默认QLocale 。
另请参见 QString::asprintf()。
max : real |
轴上的最大值。
设置该属性时,必要时会调整最小值,以确保范围有效。该值必须大于 0。
min : real |
轴上的最小值。
设置此属性时,必要时将调整最大值,以确保范围保持有效。该值必须大于 0。
minorTickCount : int |
坐标轴上的小刻度线数量。这表示在图表的主要刻度线之间绘制多少条网格线。小刻度线不绘制标签。默认值为 0。将该值设置为-1,主要刻度线之间的网格线数将自动计算。
tickCount : int |
坐标轴上刻度线的数量。这表示图表上绘制的网格线数量。该值为只读值。
信号文档
minorTickCountChanged(int minorTickCount) |
当由minorTickCount 指定的坐标轴上的小刻度线数目发生变化时,将发出该信号。
注: 相应的处理程序是onMinorTickCountChanged
。
tickCountChanged(int tickCount) |
当tickCount 指定的坐标轴上的刻度线数量发生变化时,将发出此信号。
注: 相应的处理程序是onTickCountChanged
。
© 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.