Nevron Open Vision Documentation
Scales / Strip Lines
In This Topic
    Strip Lines
    In This Topic

    Strip lines like grid lines appear on the chart or gauge plot and are primarily used to display repeating ranges. You add a strip line to the scale by adding an instance of the NScaleStrip class to the Strips collection of the scale. The Strips collection can contain an unlimited number of strip objects.

    The order in which you add objects to this collection will also define the Z order of the produced strips – strip lines representing the first strip object in the collection will be drawn first, strip lines representing the second strip object will be drawn second and so on.

    Each strip object has two properties called Length and Interval which are specified as positive integer values. The length of the stripe specifies how many ranges it will fill and the interval specifies how many ranges it will skip. For example consider you have a scale with major ticks in the range of [0, 100], with a step of 20 - this will produce the following set of ranges to be filled by the strip:

    [0, 20], [20, 40], [40, 60], [60, 80], [80, 100]

    Now if the strip has Length 1 and Interval 2 it will be displayed at the following ranges:

    [0, 20], [60, 80]

    Note that the ranges [20, 40], [40, 60] and [80, 100] will be skipped.

     Interlacing

    By default strips are synchronized with the major ticks of the scale. In order to display interlaced strips (strips that appear between each other major ticks) you need to write the following code:

    C#
    Copy Code

    NScaleStrip strip = new NScaleStrip();
    strip.Interlaced =
    true;
    scale.Strips.Add(strip);

    The Interlaced property of the strip tells it to synchronize with the view order of the major tick ranges so that the strip will start to appear after the first tick on the scale.

     Decoration Range

    Each strip has an associated decoration range that allows you to control the ranges at which it will appear. The following code will display strips at each 5 logical units: 

    C#
    Copy Code

    NNumericDecorationRange numericDecorationRange = new NNumericDecorationRange();
    numericDecorationRange.SamplingMode =
    ENSamplingMode.CustomStep;
    numericDecorationRange.CustomStep = 5;

    NScaleStrip strip = new NScaleStrip();
    strip.DecorationRange = numericDecorationRange;
    scale.Strips.Add(strip);

    The decoration range objects that you can apply to strips are the same as the ones you can specify on grid lines.

     Appearance
    The strip appearance is controlled from the Fill and Border properties of the NScaleStrip object.