IVZMapChartLabelStyle.HorizontalAlignment

Syntax

HorizontalAlignment: VisualizerLabelHorizontalAlignment;

Description

The HorizontalAlignment property determines horizontal position of map layer labels relative to topobase position.

Comments

To determine vertical position of map layer label, use the IVZMapChartLabelStyle.VerticalAlignment property.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_IVZMAPCHARTLABELSTYLE_VERTICALALIGNMENT identifier, which must include a map with enabled labels.

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

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    EMap: IVZMapChart;
    Layer: IVZMapChartLayer;
    LabelStyle: IVZMapChartLabelStyle;
Begin
    // Get the current repository
    Metabase := MetabaseClass.Active;
    // Get express report
    EaxAnalyzer := Metabase.ItemById("EXPRESS_IVZMAPCHARTLABELSTYLE_VERTICALALIGNMENT").Edit As IEaxAnalyzer;
    // Get express report map
    EMap := EaxAnalyzer.MapChart.MapChart;
    // Get map layer
    Layer := EMap.RootLayer.LayerById("Regions");
    // Get map layer labels for editing
    LabelStyle := Layer.LabelsStyle;
    // Change label position vertically and horizontally
    LabelStyle.VerticalAlignment := VisualizerLabelVerticalAlignment.Bottom;
    LabelStyle.HorizontalAlignment := VisualizerLabelHorizontalAlignment.Left;
    // Get express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example position of the Regions map layer labels in express report is shifted down and to the left relative topobase position.

See also:

IVZMapChartLabelStyle