Nevron Open Vision Documentation
Scales / Labels / Generation
In This Topic
    Generation
    In This Topic

    Standard scales (numeric, ordinal, date/time etc.) by default generate an automatic label per each major tick in a single scale level. You can control the process of automatic label generation using the NumberOfTicksPerLabel and LabelGenerationMode properties.

     Ticks per Label

    By default the scale will create a label for each major tick on the scale. In some cases however you may want labels to be less dense than ticks - in such cases you can change the NumberOfTicksPerLabel property allowing you to create scales where labels skip major ticks. The following code snippet will configure the axis to display one label for each two ticks:

    C#
    Copy Code

    scale.NumberOfTicksPerLabel = 2;

     Label Generation Mode

    Often when you have densely populated scales the labels overlap. By default the scale is configured to resolve label overlapping by staggering and auto scaling texts. However this can often be unpractical, because the scale will change its size when you have overlapping and when not. To avoid this you can consider to force the scale to always generate staggered labels regardless of whether the labels overlap or not. This is done with the help of the LabelGenerationMode property:

    C#
    Copy Code

    scale.LabelGenerationMode = ENLabelGenerationMode.Stagger2;

    The following table lists the available options:

    ENLabelGenerationMode Description
    SingleLevel All labels are generated in one scale level
    Stagger2 Labels are generated in two scale levels, thus producing a two level staggering effect
    Stagger3 Labels are generated in three scale levels, thus producing a three level staggering effect