Adds values to a chart's axes. 更多...
| import 語句: | import QtCharts 2.2 |
| 實例化: | QValueAxis |
| 繼承: | AbstractAxis |
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.
以下範例代碼闡明如何使用 ValueAxis 類型:
ChartView {
ValueAxis {
id: xAxis
min: 0
max: 10
}
// Add a few series...
}
格式字符串支持的以下轉換說明符、長度修飾符和標誌的提供通過
printf()
在標準 C++ 庫:d、i、o、x、X、f、F、e、E、g、G、c。
若
ChartView.localizeNumbers
is
true
,支持的說明符限於:d、e、E、f、g、G 和 i。另外,僅支持精度修飾符。其餘格式來自默認
QLocale
對於應用程序。
另請參閱 QString::asprintf() .
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 minimum value on the axis.
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid.
The number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the chart. Labels are not drawn for minor ticks. The default value is 0.
The number of tick marks on the axis. This indicates how many grid lines are drawn on the chart. The default value is 5, and the number cannot be less than 2.
此信號發射,當 min or max value of the axis changes.
The corresponding signal handler is
onRangeChanged
.
修改軸的當前範圍和刻度標記數,以使看起來 nice . The algorithm considers numbers that can be expressed as a form of 1*10^n, 2* 10^n, or 5*10^n to be nice numbers. These numbers are used for setting spacing for the tick marks.