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.

To execute the example, add links to the Express, Metabase, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    EMap: IVZMapChart;
    Layer: IVZMapChartLayer;
    LabelStyle: IVZMapChartLabelStyle;
Begin
    // Get a repository object
    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 to edit
    LabelStyle := Layer.LabelsStyle;
    // Change vertical and horizontal position of label
    LabelStyle.VerticalAlignment := VisualizerLabelVerticalAlignment.Bottom;
    LabelStyle.HorizontalAlignment := VisualizerLabelHorizontalAlignment.Left;
    // Save 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 doen and to the left relative topobase position.

See also:

IVZMapChartLabelStyle