IVZDataScale.InactiveItem

Fore Syntax

InactiveItem: Variant;

Fore.NET Syntax

InactiveItem: System.Object;

Description

The InactiveItem property determines settings for inactive visualizer elements.

Comments

As the property value determine the brush described with the  IGxBrush interface or numeric value depending on the scale type.

Visualizer element is considered inactive if it belongs to the interval that is not selected for displaying in the legend.

Fore example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier that contains bubble tree. The color scheme of bubble tree looks as on the IVZDataScale interface description page. Set new colors for scale elements.

Add links to the Metabase, Express, Drawing, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase; // Repository
    EaxAnalyzer: IEaxAnalyzer; // Express report
    BubbleTree: IVZBubbleTree; // Bubble tree
    Scale: IVZDataScale; // Color scale
    Color: IGxColor; // Color 
    ColorLegend: IVZColorLegendBase; // Color legend
Begin
    // Get repository object
    Metabase := MetabaseClass.Active;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get bubble tree color scale
    Scale := BubbleTree.ColorVisual.ColorMapping.Scale;
    // Create purple color
    Color := New GxColor.CreateRGB(1020204);      
    // Determine this color for legend element bubbles
    Scale.InactiveItem := New GxSolidBrush.Create(Color);
    // Set the color of bubbles from the second legend interval  
    Scale.IsInactiveItem(1) := True;
    // Create olive color
    Color := New GxColor.CreateRGB(1281280);  
    // Determine brush for the No Data legend element
    Scale.NoData := New GxSolidBrush.Create(Color);
    // Get legend 
    ColorLegend := BubbleTree.Legends.Item(0As IVZColorLegendBase;
    // Enable highlighting of legend elements 
    ColorLegend.DoHighlight := True;
    // Create a mustard color
    Color := New GxColor.CreateRGB(2052050);
    ColorLegend.HighlightBrush := New GxSolidBrush.Create(Color);
    // Set whether legend elements can be selected by click
    ColorLegend.HoverMode := VisualizatorHoverMode.Click;
    // Save changes to the express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

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
    Color: IGxColor; // Color 
    ColorLegend: IVZColorLegendBase; // Color legend
    Brush: IGxSolidBrush;// Brush 
Begin
    // Get repository object
    Metabase := Params.Metabase;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get bubble tree color scale
    Scale := BubbleTree.ColorVisual.ColorMapping.Scale;
    // Create purple color
    Color := New GxColor();
    Color.CreateRGB(1020204);  
    // Determine this color for legend element bubbles
    Brush := New GxSolidBrush();
    Brush.Color := Color As GxColor;
    Scale.InactiveItem := Brush;
    // Set bubble color from the second legend interval
    Scale.IsInactiveItem[1] := True;
    // Create olive color
    Color := New GxColor();
    Color.CreateRGB(1281280); 
    // Determine brush for the No Data legend element
    Brush := New GxSolidBrush();
    Brush.Color := Color As GxColor;
    Scale.NoData := Brush;
    // Get legend 
    ColorLegend := BubbleTree.Legends.Item[0As IVZColorLegendBase;
    // Enable highlighting of legend elements 
    ColorLegend.DoHighlight := True;
    // Create a mustard color
    Color := New GxColor();
    Color.CreateRGB(2052050);
    Brush := New GxSolidBrush();
    Brush.Color := Color As GxColor;
    ColorLegend.HighlightBrush := Brush;
    // Set whether legend elements can be selected by click
    ColorLegend.HoverMode := VisualizatorHoverMode.vhmClick;
    // Save changes in express report
    (EaxAnalyzer As IMetabaseObject).Save();
End Sub;

See also:

IVZDataScale