IVZDataScale.Type

Fore Syntax

Type: VisualizatorScaleType;

Fore.NET Syntax

Type: Prognoz.Platform.Interop.Visualizators.VisualizatorScaleType;

Description

The Type property determines visualizer scale type.

Comments

After changing visualizer scale type, recalculate the scale by means of IVZDataScale.AutoSetupScaleItems.

Fore Example

Executing the example requires that the repository contains an express report with a bubble tree with metrics Color and Size. For bubble tree, leave only numeric scale and display its value range.

Place the Button, UiErAnalyzer, EaxDocumentViewerBox components named Button1, UiErAnalyzer1 and EaxDocumentViewerBox1 correspondingly on the form. For UiErAnalyzer select the Active property to True, OperationMode to Edit and select the express report in the Object property. For EaxDocumentViewerBox select the UiErAnalyzer1 component in the property Analyzer.

Add links to the system assemblies: Express, Forms, Visualizators (for Fore.NET example add links to Metabase, KeFore and Forms.NET).

The example is the OnClick event handler for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    BubbleTree: IVZBubbleTree; 
// Bubble tree
    Scale: IVZDataScale; // Color/size scale
Begin
    BubbleTree := UiErAnalyzer1.ErAnalyzer.BubbleTree.BubbleTree;
    
// Get color scale of bubble tree
    Scale := BubbleTree.ColorVisual.ColorMapping.Scale;
    
// Change scale type to numeric
    Scale.Type := VisualizatorScaleType.Double;
    
// Display the range of values to the console
    Debug.WriteLine("Range of values: " + Scale.MinValue.ToString + " - " + Scale.MaxValue.ToString);
    // 
Recalculate scale
    Scale.AutoSetupScaleItems;
    
// Refresh bubble tree
    UiErAnalyzer1.ErAnalyzer.BubbleTree.Refresh;
End Sub Button1OnClick;

After clicking the button, numeric scale for the bubble tree stays in the express report. The console displays the range of scale values:

Value range: 3 - 22.1526785000136

Fore.NET Example

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.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Forms;
Imports Prognoz.Platform.Interop.Visualizators;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    BubbleTree: IVZBubbleTree; 
// Bubble chart
    Scale: IVZDataScale; // Color/size scale
Begin
    BubbleTree := uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer.BubbleTree.BubbleTree;
    
// Get color scale of bubble tree
    Scale := BubbleTree.ColorVisual.ColorMapping.Scale;
    
// Change scale type to numeric
    Scale.Type := VisualizatorScaleType.vstDouble;
    
// Display value range to the console
    System.Diagnostics.Debug.WriteLine("Range value: " + Scale.MinValue.ToString() + " - " + Scale.MaxValue.ToString());
    
// Recalculate scale
    Scale.AutoSetupScaleItems();
    
// Refresh bubble tree
    uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer.BubbleTree.Refresh();
End Sub;

See also:

IVZDataScale