IMapBarVisual.LeastHeightPart

Syntax

LeastHeightPart: Double;

Description

The LeastHeightPart property determines minimum part of indicator bar height. Available values lie in the range [0..1]. The property value is 0.2 by default.    

Example

Executing the example requires a regular report with the REGULAR_REPORT identifier, which sheet contains a data table with data by regions and a map (.tbs) with the Regions layer where a bar indicator is added. Add links to the Metabase, Report, Tab, Drawing, Map system assemblies in the module.

Sub UserProc;
Var
    Metabase: IMetabase;
    MetabaseObject: IMetabaseObject;
    Report: IPrxReport;
    Map: IMap;
    MapBar: IMapBarVisual;
Begin
    Metabase := MetabaseClass.Active;
    Report := Metabase.ItemById("REGULAR_REPORT").Edit As IPrxReport;
    // Determine map on regular report sheet
    Map := Report.ActiveSheet.Table.Objects.Item(0).Extension As IMap;
    // Determine bar indicator
    MapBar := Map.Layers.FindByName("Regions").Visuals.Item(0As IMapBarVisual;
    // Set part of minimum height and width of indicator bars
    MapBar.LeastHeightPart := 0.4;
    MapBar.LeastWidthPart := 0.5;
    // Set maximum number of bars
    MapBar.BarsCount := 2;
    // Determine indicator bar fill parameters
    MapBar.Color.Values.Count := 2;
    MapBar.Color.Values.Item(0) := GxColor.FromName("Red");
    MapBar.Color.Values.Item(1) := GxColor.FromName("Blue");
    // Set hatching color for indicator bars
    MapBar.Fill.Value := GxHatchStyle.Cross;
    MapBar.FillColor.Values.Item(0) := GxColor.FromName("Green");
    // Determine height of indicator parts and distance between them
    MapBar.Height.Value := 12;
    MapBar.InterBarDistance := 2;
    // Enable the use of percent scale for bar indicator
    MapBar.Percentage := True;
    // Set width of indicator parts and initial rotation angle
    MapBar.Width.Value := 12;
    MapBar.StartAngle := 50;
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example open and refresh the regular report, bar indicators appear on the map by all specified parameters.

See also:

IMapBarVisual