MapArea.Shape 属性

定义

获取或设置 MapArea 对象的形状。Gets or sets the shape of a MapArea object.

public:
 property System::Web::UI::DataVisualization::Charting::MapAreaShape Shape { System::Web::UI::DataVisualization::Charting::MapAreaShape get(); void set(System::Web::UI::DataVisualization::Charting::MapAreaShape value); };
[System.ComponentModel.Bindable(true)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)]
public System.Web.UI.DataVisualization.Charting.MapAreaShape Shape { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)>]
member this.Shape : System.Web.UI.DataVisualization.Charting.MapAreaShape with get, set
Public Property Shape As MapAreaShape

属性值

MapAreaShape

一个 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.

检索 MapArea 存储在中的对象的形状时 MapAreasCollection ,任何不是矩形或圆形的形状都将被视为多边形。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. 例如,可以使用对象作为参数将自定义映射区添加到地图区集合 GraphicsPath ,这允许使用任意类型的形状。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. 如果 Shape 检索此特定对象的属性 MapArea ,它将返回 PolygonIf the Shape property of this particular MapArea object is retrieved, it will return a Polygon.

定义映射区的形状和坐标后, ToolTip Url 可以使用、和/或 MapAreaAttributes 属性指定特定的用户交互。After the shape and coordinates of a map area are defined, the ToolTip, Url and/or MapAreaAttributes properties can be used to specify a particular user interaction.

注意以下事项:Note the following:

  • 仅当根图表对象的 IsMapEnabled 属性为 true (这是默认值)时,才会在运行时创建客户端图像映射。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.

  • 若要通过将 MapArea 对象添加到地图区集合来创建图像映射,图表对象的 RenderType 属性必须为 RenderType. ImageTag。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.

适用于