DoHighlight: Boolean;
DoHighlight: System.Boolean;
The DoHighlight property determines whether color scale elements can be highlighted.
The property is set to True if highlighting of color scale elements is enabled, and False if highlighting of color scale elements is disabled. Default value is False.
To determine highlighting color for legend elements, use the IVZColorLegendBase.HighlightBrush property.
To set the action, executing of which highlights a legend element, use the IVZColorLegendBase.HoverMode property.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing a bubble tree.
Add links to the Drawing, Express, Metabase, Visualizators system assemblies.
Sub UserProc;
Var
Metabase: IMetabase; // Metabase
Analyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
ColorLegend: IVZColorLegendBase; // Color legend
Brush: IGxBrush; // Brush
Begin
// Get metabase object
Metabase := MetabaseClass.Active;
// Get express report object
Analyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := Analyzer.BubbleTree.BubbleTree;
// Get tree color legend
ColorLegend := BubbleTree.Legends.Item(0) As IVZColorLegendBase;
// Enable scale element highlighting
ColorLegend.DoHighlight := True;
// Determine brush
Brush := New GxSolidBrush.Create(New GxColor.CreateRGB(202, 218, 186));
ColorLegend.HighlightBrush := Brush;
// Determine legend element selection mode - by click
ColorLegend.HoverMode := VisualizatorHoverMode.Click;
// Save changes made in express report
(Analyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the clicked legend element is highlighted with the specified color in the express report.
The requirements and result of the Fore.NET example execution match with those in the Fore example. The specified procedure is an entry point for the .NET assembly.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;
...
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase; // Metabase
Analyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
ColorLegend: IVZColorLegendBase; // Color legend
Brush: GxSolidBrush; // Brush
Color: GxColor; // Color
Begin
// Get metabase object
Metabase := Params.Metabase;
// Get express report object
Analyzer := Metabase.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := Analyzer.BubbleTree.BubbleTree;
// Get tree color legend
ColorLegend := BubbleTree.Legends.Item[0] As IVZColorLegendBase;
// Enable scale element highlighting
ColorLegend.DoHighlight := True;
// Create a color and a brush
Color := New GxColor();
Color.CreateRGB(202, 218, 186);
Brush := New GxSolidBrush();
Brush.Create(Color);
// Determine brush
ColorLegend.HighlightBrush := Brush;
// Determine legend element selection mode - by click
ColorLegend.HoverMode := VisualizatorHoverMode.vhmClick;
// Save changes made in express report
(Analyzer As IMetabaseObject).Save();
End Sub;
See also: