Improve automated and manual chart time axis scale management
Specifications to be found here #5 (closed):
Requirements for automatically calculated humanly nice horizontal time axes scales:
- According to Chart Graphique drop axes grids and ticks for too small charts, otherwise:
- Configure a minimum (for small charts) for the step size (in number of pixels) depending on the text to be displayed and respect these limits, e.g. the text width of the first period including three additional empty spaces
- Depending on available space for the labels (see minimum step size above) show one major tick per year (or per multi-year period latter for frequencies smaller than annual, e.g. biennial), otherwise show one major tick per smallest possible multiple of years (or of multi-year periods)
- The end period is calculated as multiple of the major tick step starting from the start period; the calculated end period is as close as possible to and equal or greater than the last time period of the data.
- Show minor ticks for each time periods if there is enough space to visually distinguish the tick from neighboured ticks (e.g. 1 tick requires a minimum horizontal space of 4 pixels), otherwise per year (or per multi-year period for frequencies smaller than annual, e.g. biennial)
- Show labels for time periods with just enough space for labels (see above) in a constant rhythm that includes major ticks (when major tick step % label step = 0)
- The user can set the step for labels and it is applied only if there will be enough space for labels (see above) and if major tick step % label step = 0
Edited by Jens Dossé