IVZDataCoordinateAdapter.IncludeZero

Fore syntax

IncludeZero: Boolean;

Fore.NET syntax

IncludeZero: boolean;

Description

The IncludeZero property determines whether zero value are excluded in transformer.

Comments

Available values:

This property execute the min(MinValue, 0) operation on determining minimum value by data (IVZDataNormalizeAdapter.MinValue).

To determine whether data is processed in transformer by unit, use IVZDataCoordinateAdapter.UseSignDivision.

Fore example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing map bar factors.

Ad links to the Express, Metabase, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    Express: IEaxAnalyzer;
    Map: IVZMapChart;
    Layer: IVZMapChartLayer;
    DataSourceMapping: IVZMultipleDataSourceMapping;
    BarVisual: IVZMapChartBarVisual;
    DataTransformer: IVZDataCoordinateAdapter;
Begin
    // Get repository
    Metabase := MetabaseClass.Active;
    // Get express report
    Express := Metabase.ItemById("EXPRESS").Bind As IEaxAnalyzer;
    // Get map
    Map := Express.MapChart.MapChart;
    // Get map layer
    Layer := Map.RootLayer.SubLayers.Item(0);
    // Get visual view
    BarVisual := Layer.Bars.Item(0).BarVisual;
    // Get data mapping settings
    DataSourceMapping := BarVisual.HeightMapping;
    DataTransformer := DataSourceMapping.Item(0).DataTransformer As IVZDataCoordinateAdapter;
    // Set top interval border
    DataTransformer.MaxValue := 30;
    // Set bottom interval border
    DataTransformer.MinValue := 2;
    // Process value by unit
    DataTransformer.UseSignDivision := True;
    // Exclude zero values
    DataTransformer.IncludeZero := True;
    // Output to console window
    Debug.WriteLine("Data transformation:");
    Debug.WriteLine("Input: -10, output: " +
        ((DataTransformer.GetData(-10)) As Double).ToString);
    Debug.WriteLine("Input: -5, output: " +
        ((DataTransformer.GetData(-5)) As Double).ToString);
    Debug.WriteLine("Input: 0, output: " +
            ((DataTransformer.GetData(0)) As Double).ToString);
    Debug.WriteLine("Input: 5, output: " +
            ((DataTransformer.GetData(5)) As Double).ToString);
End Sub UserProc;

After executing the example the console window displays output values.

Fore.NET example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase;
    Express: IEaxAnalyzer;
    Map: IVZMapChart;
    Layer: IVZMapChartLayer;
    DataSourceMapping: IVZMultipleDataSourceMapping;
    BarVisual: IVZMapChartBarVisual;
    DataTransformer: IVZDataCoordinateAdapter;
Begin
    // Get repository
    Metabase := Params.Metabase;
    // Get express report
    Express := Metabase.ItemById["EXPRESS"].Bind() As IEaxAnalyzer;
    // Get map
    Map := Express.MapChart.MapChart;
    // Get map layer
    Layer := Map.RootLayer.SubLayers.Item[0];
    // Get visual view
    BarVisual := Layer.Bars.Item[0].BarVisual;
    // Get data mapping settings
    DataSourceMapping := BarVisual.HeightMapping;
    DataTransformer := DataSourceMapping.Item[0].DataTransformer As IVZDataCoordinateAdapter;
    // Set top interval border
    DataTransformer.MaxValue := 30;
    // Set bottom interval border
    DataTransformer.MinValue := 2;
    // Process value by unit
    DataTransformer.UseSignDivision := True;
    // Exclude zero values
    DataTransformer.IncludeZero := True;
    // Output to console window
    System.Diagnostics.Debug.WriteLine("Data transformation:");
    System.Diagnostics.Debug.WriteLine("Input: -10, output: " +
        ((DataTransformer.GetData(-10)) As Double).ToString());
    System.Diagnostics.Debug.WriteLine("Input: -5, output: " +
        ((DataTransformer.GetData(-5)) As Double).ToString());
    System.Diagnostics.Debug.WriteLine("Input: 0, output: " +
            ((DataTransformer.GetData(0)) As Double).ToString());
    System.Diagnostics.Debug.WriteLine("Input: 5, output: " +
            ((DataTransformer.GetData(5)) As Double).ToString());
End Sub;

See also:

IVZDataCoordinateAdapter