IVZDataScale.ItemValue

Syntax

ItemValue(Value: Double): Variant;

Parameters

Value. The value, according to which a visualizer scale element is to be obtained.

Description

The ItemValue property returns scale elements corresponding to the specified value.

Comments

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

Example

Executing the example requires that the repository contains an express report with the EXP identifier. The module containing the example should have links to the Drawing, Express, Metabase and Visualizators system assemblies. The specified procedure should be called from the Main entry point.

Calculate the average value of the scale an determine color of the bubble corresponding to this value:

Sub UserProc;
Var
    Metabase: IMetabase; // Metabase
    Analyzer: IEaxAnalyzer; // Express report
    Scale: IVZDataScale; // Scale
    Value: Double; // Average value of the scale
    Item: IGxSolidBrush; // Brush for scale elements   
Begin
    // Get metabase object
    Metabase := MetabaseClass.Active;
    // Get express report object
    Analyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
    // Get bubble tree color scale
    Scale := Analyzer.BubbleTree.BubbleTree.ColorVisual.ColorMapping.Scale;
    
    // Get average value of the scale
    Value := (Scale.MaxValue - Scale.MinValue) / 2;
    Debug.WriteLine("Scale average value: " + Value.ToString);
    
    // Determine the scale bubble corresponding to average value
    Item := Scale.ItemValue(Value);
    Debug.WriteLine("Bubble color for average value: (" +
        Item.Color.R.ToString + ", " + Item.Color.G.ToString + ", " +
        Item.Color.B.ToString + ")");
End Sub UserProc;

After executing the example, the browser console window displays scale average value and color of the bubble corresponding to this value:

Scale average value: 22.5

Bubble color for average value: (255, 70, 44)

See also:

IVZDataScale