Axis Ticks - MajorDelta, MinorDelta and AutoTicks
Axis Ticks, Labels and Grid Lines
In SciChart, the Ticks are small marks around the chart on an axis. There are Minor and Major Ticks, where Minor Ticks are placed in between Major ones. By default, Major Ticks are longer and thicker than Minor Ticks.
Axis Labels appears for every Major Tick, if there is enough space around. If Axis Labels are placed too tightly, some of them get culled to make more space. If necessary, labels culling can be switched off via
Grid Lines correspond to Ticks on an axis. Likewise, there are Minor and Major Grid lines. In SciChart, axes are responsible not only for drawing Ticks and Labels, but also for the chart grid. An axis draws only those Grid Lines that can be measured against it, i.e. a horizontal axis draws vertical grid lines and vice versa.
Automatic Tick Spacing
In SciChart, the difference between two Major Ticks is called MajorDelta, and that between two minor Ticks - MinorDelta. By default, both delta values, and therefore the Tick spacing, are calculated automatically according to the VisibleRange and size of an axis. As zoom level changes, the
ISCIAxisCore.minorDelta of every axis will be updated correspondingly, and the tick frequency may change.
There are two additional options used to control the auto ticking behavior. The
ISCIAxisCore.maxAutoTicks property allows to limit the number of generated ticks to the desired number, and the
ISCIAxisCore.minorsPerMajor - specifies how many Minor Ticks are drawn between two Major Ticks (the default is 5).
Altering Tick Spacing
It is also possible to set MinorDelta and MajorDelta manually. To change them, automatic calculation must be switched off via the
ISCIAxisCore.autoTicks property. To set delta values, call the
ISCIAxisCore.majorDelta properties. Please note that both delta values need to be set in this case:
SCIDateAxis the majorDelta and minorDelta should be set with a Date object whose tick value is the desired timespan.
Altering Tick Spacing for the Logarithmic Axis
SCILogarithmicNumericAxis is a special case that need to be mentioning here. Due to the exponential nature of this axis type, MajorDelta represents the difference between exponents of neighbouring major ticks, not between their actual values. For instance, having
ISCIAxisCore.majorDelta = 3 and
ISCILogarithmicNumericAxis.logarithmicBase = 10 on a
SCILogarithmicNumericAxis specifies that major ticks and gridlines will be spaced at 103 intervals (exponents will be divisors of MajorDelta):
On the contrary, the difference between neighbouring minor ticks is not exponential. Therefore, MinorDelta represents the difference between the actual values of neighbouring minor ticks.
For instance, having
ISCIAxisCore.minorDelta = 100 results in minor ticks and gridlines appearing with the increment of 100x10E, where
E is the exponent of the nearest major tick to the left. So, the interval will be like the following: