AxisMinorTickLabelOptions
AxisMinorTickLabelOptions ( axisIndex ; location ; hOffset ; vOffset ; labelEveryNthTickMark ; startAtTickMark ; repeatLabelPattern )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
axisIndex | int | 0..10000 | all | |
location | int | 1..3 | out | |
hOffset | num | -10000..10000 | 0 | Dimension:[pt] |
vOffset | num | -10000..10000 | 0 | Dimension:[pt] |
labelEveryNthTickMark | int | 1..1e6 | 1 | |
startAtTickMark | int | 1..1e6 | 1 | |
repeatLabelPattern | int | 0..1 | on |
Examples
AxisMinorTickLabelOptions(x;out;;;2)
AxisMinorTickLabelOptions(y;in;;;2;1;off)
Description
The functions for labeling and designing the minor tick marks work exactly the same way as the functions for labeling the major tick marks. Unlike the function AxisMajorTickLabelOptions() , the function AxisMinorTickLabelOptions() has an additional argument repeatLabelPattern. As the default, the label pattern of the minor tick mark texts defined by the arguments labelEveryNthTickMark and startAtTickMark is reset at every major tick mark and starts again from the beginning (repeatLabelPattern = on). If repeatLabelPattern = off is set, then the label pattern is not repeated, but rather runs through the entire scaling regardless of the major tick marks. This proves to be advantageous, e.g. for weekly scalings, as the minor scaling (week) does not exactly match the major scaling (year, quarter or month).
| AXIS_MINOR_TICK_LABEL_OPTIONS_01 |
1 | OpenDrawing(250;150) |
2 | DateTimeOptions(ymd;2) |
3 | ChartData(2024-6-15 2024-9-22) |
4 | GanttChart(label;150) |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;poly;1.5;#4682b4) |
8 | /* Set up axes. */ |
9 | |
10 | |
11 | AxisMajorTicks(all;0) |
12 | AxisMinorTicks(all;0) |
13 | AxisMajorTickLabelTexts(x;"|MON|") |
14 | |
15 | AxisMinorTickLabelTexts(x;"WK |WY|") |
16 | AxisMinorTickLabelStyle(x;;;;;;-90) |
17 | AxisMinorTickLabelOptions(x;;;;2;;on) |
18 | /* Set up grid. */ |
19 | MajorGridLineWidths(x;y;0) |
20 | MajorGridLineWidths(y;x;0.5) |
21 | MinorGridLineWidths(y;x;0.5) |
22 | MajorGridLineColors(y;x;#4682b4) |
23 | MinorGridLineColors(y;x;#4682b440) |
24 |
The same example with repeatLabelPattern = off:
| AXIS_MINOR_TICK_LABEL_OPTIONS_02 |
1 | OpenDrawing(250;150) |
2 | DateTimeOptions(ymd;2) |
3 | ChartData(2024-6-15 2024-9-22) |
4 | GanttChart(label;150) |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;poly;1.5;#4682b4) |
8 | /* Set up axes. */ |
9 | |
10 | |
11 | AxisMajorTicks(all;0) |
12 | AxisMinorTicks(all;0) |
13 | AxisMajorTickLabelTexts(x;"|MON|") |
14 | |
15 | AxisMinorTickLabelTexts(x;"WK |WY|") |
16 | AxisMinorTickLabelStyle(x;;;;;;-90) |
17 | AxisMinorTickLabelOptions(x;;;;2;;off) |
18 | /* Set up grid. */ |
19 | MajorGridLineWidths(x;y;0) |
20 | MajorGridLineWidths(y;x;0.5) |
21 | MinorGridLineWidths(y;x;0.5) |
22 | MajorGridLineColors(y;x;#4682b4) |
23 | MinorGridLineColors(y;x;#4682b440) |
24 |