Adds values to a graph's axes. 更多...
import 语句: | import QtGraphs |
实例化: | QValueAxis |
继承: | |
状态: | 技术预览 |
The ValueAxis type can be set up to show an axis line with tick marks, grid lines, and shades. The values on the axis are drawn at the positions of tick marks.
The following example code illustrates how to use the ValueAxis type:
GraphsView { LineSeries { axisX: ValueAxis { max: 10 tickInterval: 1 } axisY: ValueAxis { min -20 max: 40 } // Add a few XYPoint data... } }
labelDecimals : int |
The number of decimals used for showing the labels. When set to -1, decimal amount is adjusted automatically based on the values range. The default value is -1.
labelFormat : string |
格式字符串支持的以下转换说明符、长度修饰符和标志的提供通过
printf()
在标准 C++ 库:d、i、o、x、X、f、F、e、E、g、G、c。
The default value is empty, in which case 'f' format is used.
另请参阅 QString::asprintf ().
max : real |
The maximum value on the axis.
When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid. The default value is 10.0
min : real |
The minimum value on the axis.
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid. The default value is 0.0
minorTickCount : int |
The number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the graph. Labels are not drawn for minor ticks. The default value is 0.
tickAnchor : real |
The base value where the dynamically placed tick marks and labels are started from. 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.
此信号发射当 min or max value of the axis changes.
The corresponding signal handler is
onRangeChanged
.
注意:
相应处理程序是
onRangeChanged
.