Gets or sets the coordinates of a MapArea object.
Coordinates of the area.
Visual Basic (Declaration) | |
---|---|
Public Property Coordinates As Single() |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public float[] Coordinates {get; set;} |
Return Value
An array of coordinates that is dependent on the shape of the map area.
The following sample creates a custom image map that has a rectangular shape. We set the shape and coordinates of the MapArea object, and then add it to the MapAreas collection in the Page_Load event.
Visual Basic | Copy Code |
---|---|
Imports Dundas.Charting.WebControl |
This property is usually used to set the coordinates of a custom map area object which 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 chart's relative coordinate system, where the top-left corner of the chart image is "0,0" and the bottom-right corner of the image is "100,100". For more information see the Chart Coordinate System topic.
Once a map area's shape and coordinates are defined the ToolTip, Href and/or MapAreaAttributes properties can be used to specify some sort of user interaction.
Please note:
- A client-side image map will only be created at run-time if the MapEnabled property of the root Chart object is true (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 RenderType.ImageTag. It is possible to create an image map when using binary streaming, but a special technique must be used. Refer to the Client-Side Mapping and Binary Streaming topic for further details.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family