MapArea.Coordinates Property

Definition

Gets or sets the coordinates of a MapArea object.

public:
 property cli::array <float> ^ Coordinates { cli::array <float> ^ get(); void set(cli::array <float> ^ value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.DataVisualization.Charting.MapAreaCoordinatesConverter))]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)]
public float[] Coordinates { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.DataVisualization.Charting.MapAreaCoordinatesConverter))>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)>]
member this.Coordinates : single[] with get, set
Public Property Coordinates As Single()

Property Value

Single[]

An array of coordinates that is dependent on the shape of the map area.

Attributes

Remarks

The Coordinates property is usually used to set the coordinates of a custom map area object that has a user-defined shape and coordinates.

The coordinates that must be specified for a custom map area depend on the shape of the map area:

  • Circle. Three coordinates must be provided: "x1, y1, r", where "x1, y2" are the coordinates of the center of the circle, and "r" is the radius of the circle.

  • Rectangle. Four coordinates must be provided: "x1, y1, x2, y2", where "x1, y1" are the coordinates of the upper-left corner of the rectangle and "x2, y2" are the coordinates of the lower-right corner of the rectangle.

  • Polygon. Two or more x and y pairs must be provided "x1, y1, x2, y2...xn, yn", where each "x, y" pair contains the coordinates of one vertex of the polygon.

When setting coordinates, use the relative coordinate system of the chart, where the top-left corner of the chart image is "0,0" and the bottom-right corner of the image is "100,100".

After the shape and coordinates are defined for the map area, the ToolTip, Url and/or MapAreaAttributes properties can be used to specify a particular user interaction.

Note the following:

  • A client-side image map will only be created at run time if the IsMapEnabled property of the root Chart object is true, which is the default.

  • To create an image map by adding a MapArea object to the map areas collection, the RenderType property of the Chart object must be set to ImageTag. It is possible to create an image map when using binary streaming, but a special technique must be used.

Applies to