IMapPieVisual.PiesCount

Syntax

PiesCount: Integer;

Description

The PiesCount property determines the maximum number of displayed indicator sectors.

Comments

If the property value is zero, all indicator sectors are displayed.

Example

Executing the example requires a form, a button named Button1 on the form, the UiMap component named UiMap1 that is a data source for the MapBox component. The map must be connected to the UiMap1 component. The VisualDataAdapter class, that creates a dynamic data source, must also be implemented. The class example is contained in the IMapVisual.DataAdapter property description.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Map: IMap;
    Layer: IMapLayer;
    PieVisual: IMapPieVisual;
    Color: IMapVisualColorProperty;
    Collection: IMapColorCollection;
Begin
    Map := UiMap1.Map;
    Layer := Map.Layers.FindByName("Regions");
    PieVisual := Layer.Visuals.AddPieVisual;
    PieVisual.DataAdapter := New VisualDataAdapter.Create As IMapDynamicDataAdapter;
    Color := PieVisual.Color;
    Color.DataAdapter := PieVisual.DataAdapter;
    Color.Dependent := False;
    Collection := Color.Values;
    Collection.Count := 2;
    Collection.Item(0) := GxColor.FromName("Red");
    Collection.Item(1) := GxColor.FromName("Blue");
    PieVisual.Radius.Value := 2.5;
    PieVisual.PiesCount := 0;
End Sub Button1OnClick;

After executing the example, the pie indicator is added to the Regions layer, red and blue colors are used to hatch this indicator. All indicator sectors are displayed.

See also:

IMapPieVisual