In QChart, how can I set tick with uneven space? In the example chart below, notice the first grid is smaller than others. How is it actually done? Thanks.
Asked
Active
Viewed 405 times
1 Answers
0
You need to set the TickType of your QValueAxis to QValueAxis::TicksDynamic
.
Then you can set a tick anchor (i.e. the value where the first tick should be placed, e.g. 80.0 in the example image you provided) and tick intervals (the value between ticks, e.g. 2.5 in the example image)
Please note that dynamic ticks were only introducted in Qt 5.12.

CharonX
- 2,130
- 11
- 33