Dundas Chart for ASP.NET
Custom Property
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > MapArea Class : Custom Property


Gets or sets a boolean value that indicates if a MapArea object is a custom map area that has a user-defined shape and coordinates.


Indicates that map area is custom.

Syntax

Visual Basic (Declaration)  
Public Property Custom As Boolean
Visual Basic (Usage) Copy Code
Dim instance As MapArea
Dim value As Boolean
 
instance.Custom = value
 
value = instance.Custom
C#  
public bool Custom {get; set;}

Return Value

If true the MapArea object is a custom object, if false it is a MapArea object that was automatically created for a chart element (e.g. a data point, etc.).

Example

The following sample loops through all MapArea objects in the Page_Load event. If the map area is a custom area then we set the tooltip, overriding the previous tooltip value (if any).

Visual Basic Copy Code
Imports Dundas.Charting.WebControl
...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    'declare a new MapArea object
    Dim mapArea As New MapArea()

    'loop through all map area objects, and if it is a custom object set the tooltip
    For Each mapArea In Chart1.MapAreas
        If mapArea.Custom Then mapArea.ToolTip = "This is a custom map area"
    Next

End Sub

Remarks

There are two types of MapArea objects stored in the map areas collection:

  • Map areas that are automatically created when an applicable chart element (e.g. data point, series, legend item or stripline object) has a non-empty ToolTip, Href or MapAreaAttributes property (note that other html elements necessary 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.

  • Custom map areas that have a user-defined shape and coordinates. These custom map areas can be added at design-time using the Chart object's MapAreas property, or at run-time using the MapAreasCollection object's overloaded Add or Insert methods.

Requirements

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

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.