IVZDataNormalizeAdapter.NormalizeMode

Syntax

NormalizeMode: VisualizatorDataAdapterMode;

Description

The NormalizeMode property determines data normalization mode.

Example

Executing the example requires that the repository contains an express report with the EXP identifier. The Size metric should be selected in the bubble tree report. The unit containing the example should have links to the Express, Metabase and Visualizators system assemblies. The specified procedure should be called from the Main entry point.

Execute logarithmic transformation of numbers -0.05, 0, 0.05, 5 and 1000:

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    DataSourceMapping: IVZDataSourceMapping;
    SizeVisual: IVZNumericVisual;
    DataSource: IVZMultiplyDataSource;
    DataTransformer: IVZDataNormalizeAdapter;
Begin
    // Get the current repository
    Metabase := MetabaseClass.Active;
    // Get express report
    EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
    // Get text visualizer
    SizeVisual := EaxAnalyzer.BubbleTree.BubbleTree.SizeVisual;
    // Get settings for data mapping
    DataSourceMapping := SizeVisual.NumericMapping;
    // Set the Data Transformer mapping type
    DataSourceMapping.MappingType := VisualizatorDataMappingType.DataMappingTransformer;
    // Set title for data source corresponding to identifier
    DataSource := DataSourceMapping.DataSource; 
    // Create data transformer
    DataTransformer := New VZDataNormalizeAdapter.Create;
    // Load data from source
    DataTransformer.InitializeFromDataSource(DataSource);
    // Set logarithmic mode of data normalization
    DataTransformer.NormalizeMode := VisualizatorDataAdapterMode.Logarithm;
    // Set this transformer
    DataSourceMapping.DataTransformer := DataTransformer As IVZDataAdapter;
    Debug.WriteLine("Data transformation:");
    Debug.IndentLevel := 1;
    Debug.WriteLine("Input: -0.05, output: " + 
        ((DataTransformer.GetData(-0.05)) As Double).ToString);
    Debug.WriteLine("Input: 0, output: " + 
        ((DataTransformer.GetData(0)) As Double).ToString);
    Debug.WriteLine("Input: 0.05, output: " + 
        ((DataTransformer.GetData(0.05)) As Double).ToString);
    Debug.WriteLine("Input: 5, output: " + 
        ((DataTransformer.GetData(5)) As Double).ToString);
    Debug.WriteLine("Input: 1000, output: " + 
        ((DataTransformer.GetData(1000)) As Double).ToString);
End Sub UserProc;

After executing the example, the numbers -0.05, 0, 0.05, 5 and 1000 are logarithmically transformed. Results of this transformation are shown on the development environment console window:

Data transformation:

    Input: -0.05, output: -1.#IND

    Input: 0, output: 0.2

    Input: 0.05, output: 0.2

    Input: 5, output: 1.6094379124341

    Input: 1000, output: 6.90775527898214

See also:

IVZDataNormalizeAdapter