MapArea.Shape Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the shape of a MapArea object.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

[BindableAttribute(true)]
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public MapAreaShape Shape { get; set; }

Property Value

Type: System.Web.UI.DataVisualization.Charting.MapAreaShape

A MapAreaShape enumeration value that determines the shape of a map area object.

This property is usually used to set the shape of a custom map area object, which has a user-defined shape and coordinates.

The shape of the custom map area determines the type of coordinates that must be specified, and available shapes are circles, rectangles and polygons.

When retrieving the shapes of MapArea objects that are stored in the MapAreasCollection, any shape that is not a rectangle or a circle will be considered a polygon. For example, a custom map area can be added to the map areas collection using a GraphicsPath object as a parameter, which allows any type of shape to be used. If the Shape property of this particular MapArea object is retrieved, it will return a Polygon.

After the shape and coordinates of a map area are defined, the ToolTip, Urland/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 RenderType.ImageTag. It is possible to create an image map when using binary streaming, but a special technique must be used.

.NET Framework
Available since 4.0
Return to top
Show: