Breyta

Deila með


MapArea Class

Definition

Represents a map area.

public ref class MapArea : System::Web::UI::DataVisualization::Charting::ChartNamedElement, System::Web::UI::DataVisualization::Charting::IChartMapArea
public class MapArea : System.Web.UI.DataVisualization.Charting.ChartNamedElement, System.Web.UI.DataVisualization.Charting.IChartMapArea
type MapArea = class
    inherit ChartNamedElement
    interface IChartMapArea
Public Class MapArea
Inherits ChartNamedElement
Implements IChartMapArea
Inheritance
Implements

Remarks

The MapArea class represents a map area of a client-side image map, and corresponds to an HTML <AREA> tag.

The MapArea objects are stored in the MapAreasCollection class.

There are two types of MapArea objects:

  • Map areas that are automatically created when a chart element - for example, a data point, series, legend item or strip line object - has a non-empty ToolTip, Url or MapAreaAttributes property; note that other HTML elements that are required for a client-side image map are also created. In this case, the dimensions and location of a map area are automatically determined by the chart element. Use the CustomizeMapAreas event of the root Chart object to delete or modify these map areas at run time.

  • Custom map areas that have a user-defined shape and coordinates. Use the MapAreas property of the Chart object to add these custom map areas at design time or run time.

Setting this property will have no effect if the IsMapEnabled property is set to false. The default value is true.

Important

To create an image map using the previously described MapArea objects, 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 another technique must be used.

For custom MapArea objects, the Shape property determines the shape, and the Coordinates property determines the location of the map area.

Tooltips, hyperlinks, or attributes, such as Target=_Blank or OnClick="javascript:MyJavaScriptFunction()", can be set for all map areas.

Use the IsCustom property to determine whether a map area is a custom MapArea object; that is, whether it has user-defined shape and coordinates.

Constructors

MapArea()

Initializes a new instance of the MapArea class.

MapArea(MapAreaShape, String, Single[])

Initializes a new instance of the MapArea class with the specified shape, URL and coordinates.

MapArea(MapAreaShape, String, String, String, String, Single[], Object)

Initializes a new instance of the MapArea class with the specified shape, tooltip text, URL, attributes, postback value, coordinates and tag.

MapArea(String, GraphicsPath)

Initializes a new instance of the MapArea class with the specified URL and GraphicsPath object.

MapArea(String, RectangleF)

Initializes a new instance of the MapArea class with the specified URL and RectangleF structure.

MapArea(String, String, String, String, GraphicsPath, Object)

Initializes a new instance of the MapArea class with the specified tooltip text, URL, attributes, postback value, path and tag.

MapArea(String, String, String, String, RectangleF, Object)

Initializes a new instance of the MapArea class with the specified tooltip text, URL, attributes, postback value, rectangle coordinates and tag.

Properties

Coordinates

Gets or sets the coordinates of a MapArea object.

IsCustom

Gets or sets a value that indicates whether the map area is custom.

MapAreaAttributes

Gets or sets the attributes of the map area.

Name

Gets or sets the name of the map area.

PostBackValue

Gets or sets the postback value which can be processed on a Click event.

Shape

Gets or sets the shape of a MapArea object.

Tag

Gets or sets an object associated with this chart element.

(Inherited from ChartElement)
ToolTip

Gets or sets the tooltip for the map area.

Url

Gets or sets the destination URL or anchor point of the map area.

Methods

Dispose()

Releases the resources used by the ChartElement.

(Inherited from ChartElement)
Dispose(Boolean)

Releases the unmanaged resources used by the ChartElement and optionally releases the managed resources.

(Inherited from ChartElement)
Equals(Object)

Determines whether the specified Object is equal to the current ChartElement.

(Inherited from ChartElement)
GetHashCode()

Returns a hash function for a particular type.

(Inherited from ChartElement)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current Object.

(Inherited from ChartElement)

Applies to