IVZMapChartShape.Background

Syntax

Background: IGxBrush;

Description

The Background property determines a brush to fill map layer area background.

Comments

Background fill is displayed if metrics are not used.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report contains a map with areas and the identifier of the the Regions layer.

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

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    EMap: IVZMapChart;
    MapShape: IVZMapChartShape;
    Layer: IVZMapChartLayer;
    ShapeId: String;
    Color: IGxColor;
Begin
    // Get the current repository
    Metabase := MetabaseClass.Active;
    // Get express report
    EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get express report map as a visualizer
    EMap := EaxAnalyzer.MapChart.MapChart;
    // Get map layer
    Layer := EMap.RootLayer.LayerById("Regions");
    // Select area
    ShapeId := Layer.Shapes.Item(20).ShapeId;
    MapShape := Layer.ShapeById(ShapeId);
    // Select area on map
    MapShape.Selected := True;
    // Set up background fill for map layer area
    Color := New GxColor.CreateRGB(4747234);
    MapShape.Background := New GxSolidBrush.Create(Color);
    // Get express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the area with specified identifier is selected on the map, area background is changed to blue.

See also:

IVZMapChartShape