IVZDataScale.Less

Fore Syntax

Less(Index: Integer, useInactiveItem: Boolean): Variant;

Fore.NET Syntax

Less[Index: System.Int32, useInactiveItem: System.Boolean]: System.Object;

Parameters

Index. Scale elements index

useInactiveItem. The value showing whether inactive element is used. If the property is set to True, the inactive element is considered, if the property is set to False, the inactive item is not considered.

Description

The Less property returns visualizer scale element with the value that is less, than value of the element with the selected index.

Comments

The property returns the brush, described in the  IGxBrush interface or numeric value depending on the scale type.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier that contains a bubble tree. The color scheme of bubble tree looks as on the IVZDataScale interface description page. Set the number of scale intervals equal to 4 and determine the start and the end value of the first interval. Then get colors for bubble tree elements with the value that is greater or less than the value of the element with index 1:

Add links to the Metabase, Express, Drawing, Visualizators system assemblies. This procedure should be called from the Main entry point.

Sub UserProc;
Var
    Metabase: IMetabase; // Repository
    EaxAnalyzer: IEaxAnalyzer; // Express report
    BubbleTree: IVZBubbleTree; // Bubble tree
    Scale: IVZDataScale; // Color scale
    Item: IGxSolidBrush; // Brush for scale elements
    MinValue: Double; // Left border of the first interval
    MaxValue: Double; // Right border of the first interval
Begin
    // Get repository object
    Metabase := MetabaseClass.Active;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    // Get bubble tree color scale
    Scale := EaxAnalyzer.BubbleTree.BubbleTree.ColorVisual.ColorMapping.Scale;
    // Set number of scale intervals
    Scale.IntervalsCount := 4;
    // Get values corresponding to first interval borders
    Scale.GetValuesPair(0, MinValue, MaxValue);
    Debug.WriteLine("Start value of the first interval: " + MinValue.ToString);
    Debug.WriteLine("End value: " + MaxValue.ToString);
    // Get element with value that is less than value of the item with index 1
    Item := Scale.Less(1FalseAs IGxSolidBrush;
    If Item <> Null Then
        Debug.WriteLine("Color of smaller element: (" +
            Item.Color.R.ToString + ", " + Item.Color.G.ToString + ", " +
            Item.Color.B.ToString + ")");
    End If;
    // Get element with value that is greater than value of the item with index 1
    Item := Scale.Greater(1FalseAs IGxSolidBrush;
    If Item <> Null Then
        Debug.WriteLine("Color of larger element: (" +
            Item.Color.R.ToString + ", " + Item.Color.G.ToString + ", " +
            Item.Color.B.ToString + ")");
    End If;
    // Save changes in express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the number of intervals that equal to four is set for the bubble tree scale:

The console window displays minimum and maximum values of the first interval and the color of bubble tree elements with the value that is less or greater than the value of the element with index 1:

The start value of the first interval: 14.5

The end value: 20.5

Color of the smaller element: (235, 175, 54)

Color of the larger element: (255, 217, 0)

Fore.NET Example

The requirements and result of the Fore.NET example executing match with those in the Fore. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Visualizators;

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase; // Repository
    EaxAnalyzer: IEaxAnalyzer; // Express report
    BubbleTree: IVZBubbleTree; // Bubble tree
    Scale: IVZDataScale; // Color scale
    Item: IGxSolidBrush; // Brush for scale elements
    MinValue: Double; // Left border of the first interval
    MaxValue: Double; // Right border of the first interval
Begin
    // Get repository object
    Metabase := Params.Metabase;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
    // Get bubble tree color scale
    Scale := EaxAnalyzer.BubbleTree.BubbleTree.ColorVisual.ColorMapping.Scale;
    // Set number of scale intervals
    Scale.IntervalsCount := 4;
    // Get values corresponding to first interval borders
    Scale.GetValuesPair(0Var MinValue, Var MaxValue);
    System.Diagnostics.Debug.WriteLine("Start value of the first interval: " + MinValue.ToString());
    System.Diagnostics.Debug.WriteLine("End value: " + MaxValue.ToString());
    // Get element with value that is less than value of the item with index 1
    Item := Scale.Less[1FalseAs IGxSolidBrush;
    If Item <> Null Then
        System.Diagnostics.Debug.WriteLine("Color of smaller element: (" +
            Item.Color.R.ToString() + ", " + Item.Color.G.ToString() + ", " +
            Item.Color.B.ToString() + ")");
    End If;
    // Get element with value that is greater than value of the element with index 1
    Item := Scale.Greater[1FalseAs IGxSolidBrush;
    If Item <> Null Then
        System.Diagnostics.Debug.WriteLine("Color of larger element: (" +
            Item.Color.R.ToString() + ", " + Item.Color.G.ToString() + ", " +
            Item.Color.B.ToString() + ")");
    End If;
    // Save changes to express report
    (EaxAnalyzer As IMetabaseObject).Save();
End Sub;

See also:

IVZDataScale