InactiveBrush: IGxBrush;
InactiveBrush: Prognoz.Platform.Interop.Drawing.IGxBrush;
The InactiveBrush property determines the brush for highlighting of inactive visualizer elements.
Executing the example requires an express report with the BUBBLE_TREE identifier containing bubble tree.
Add links to the Metabase, Express, Drawing, Visualizators system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
Analyzer: IEaxAnalyzer;
BubbleTree: IVZBubbleTree;
ColorLegend: IVZColorLegendBase;
Brush: IGxBrush;
Begin
// Get metabase object
Metabase := MetabaseClass.Active;
// Get express report object
Analyzer := Metabase.ItemById("BUBBLE_TREE").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := Analyzer.BubbleTree.BubbleTree;
// Get visualizator color legend
ColorLegend := BubbleTree.Legends.Item(0) As IVZColorLegendBase;
// Enable scale elements highlighting
ColorLegend.DoHighlight := True;
// Determine brush for inactive elements highlighting
Brush := New GxSolidBrush.Create(New GxColor.CreateRGB(238, 238, 143));
ColorLegend.InactiveBrush := Brush;
// Determine brush to highlight active elements
Brush := New GxSolidBrush.Create(New GxColor.CreateRGB(49, 202, 206));
ColorLegend.HighlightBrush := Brush;
// Determine selection mode of legend elements - by click
ColorLegend.HoverMode := VisualizatorHoverMode.Click;
// Save changes to the express report
(Analyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example in the express report, the bubble tree legend contains highlighting of elements:
The requirements and result of the Fore.NET example execution match with those in the Fore example. 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;
Analyzer: IEaxAnalyzer;
BubbleTree: IVZBubbleTree;
ColorLegend: IVZColorLegendBase;
Brush: GxSolidBrushClass = New GxSolidBrushClass.Create();
GxColor: GxColorClass_2 = New GxColorClass_2.Create();
Begin
// Get metabase object
Metabase := Params.Metabase;
// Get express report object
Analyzer := Metabase.ItemById["BUBBLE_TREE"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := Analyzer.BubbleTree.BubbleTree;
// Get visualizer color legend
ColorLegend := BubbleTree.Legends.Item[0] As IVZColorLegendBase;
// Enable scale element highlighting
ColorLegend.DoHighlight := True;
// Determine brush to highlight inactive elements
GxColor.CreateRGB(238, 238, 143);
Brush.Create(GxColor);
ColorLegend.InactiveBrush := Brush;
// Determine brush to highlight active elements
GxColor.CreateRGB(49, 202, 206);
Brush.Create(GxColor);
ColorLegend.HighlightBrush := Brush;
// Determine legend element highlighting mode - by click
ColorLegend.HoverMode := VisualizatorHoverMode.vhmClick;
// Save changes to express report
(Analyzer As IMetabaseObject).Save();
End Sub;
See also: