IncludeZero: Boolean;
The IncludeZero property determines whether zero value are excluded in transformer.
Available values:
True. Default. Zero values are excluded.
False. By default for bar indicators. Zero values are not excluded.
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.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing map bar indicators.
Add 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.
See also: