InactiveItem: Variant;
The InactiveItem property determines settings for inactive visualizer elements.
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.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier containing 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 Drawing, Express, Metabase, Visualizators system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
EaxAnalyzer: IEaxAnalyzer;
BubbleTree: IVZBubbleTree;
Scale: IVZDataScale;
Color: IGxColor;
ColorLegend: IVZColorLegendBase;
Begin
// Get the current repository
Metabase := MetabaseClass.Active;
// Get express report
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(102, 0, 204);
// Determine this color for legend element bubbles
Scale.InactiveItem := New GxSolidBrush.Create(Color);
// Set bubble color from the second legend interval
Scale.IsInactiveItem(1) := True;
// Create olive color
Color := New GxColor.CreateRGB(128, 128, 0);
// Determine brush for the No Data legend element
Scale.NoData := New GxSolidBrush.Create(Color);
// Get legend
ColorLegend := BubbleTree.Legends.Item(0) As IVZColorLegendBase;
// Enable legend element highlighting
ColorLegend.DoHighlight := True;
// Create a mustard color
Color := New GxColor.CreateRGB(205, 205, 0);
ColorLegend.HighlightBrush := New GxSolidBrush.Create(Color);
// Set legend element selection on mouse click
ColorLegend.HoverMode := VisualizatorHoverMode.Click;
// Save changes in express report
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example:
Purple color of bubbles will be set on selecting elements from from the second legend interval.
Olive color is set for the No Data legend element.
Mustard color is set for highlighting of active legend intervals.
See also: