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


Gets or sets a MapAreasCollection object. Can be used to: remove or modify map areas that correspond to a chart object; and add custom map areas.


MapArea items collection.

Syntax

Visual Basic (Declaration)  
Public ReadOnly Property MapAreaItems As MapAreasCollection
Visual Basic (Usage) Copy Code
Dim instance As CustomizeMapAreasEventArgs
Dim value As MapAreasCollection
 
value = instance.MapAreaItems
C#  
public MapAreasCollection MapAreaItems {get;}

Return Value

MapAreasCollection object.

Example

The following sample loops through all map areas that have been created for a chart element, and removes those items that do not have a tooltip.
Visual Basic Copy Code
Imports Dundas.Charting.WebControl
...

Private Sub Chart1_CustomizeMapAreas(ByVal chart As Chart, ByVal e As CustomizeMapAreasEventArgs) Handles Chart1.CustomizeMapAreas

    Dim areaIndex As Integer = 0

    While areaIndex < e.MapAreaItems.Count
        ' remove areas if there is no tooltip set
        If e.MapAreaItems(areaIndex).ToolTip = String.Empty Then
            e.MapAreaItems.RemoveAt(areaIndex)
            areaIndex -= 1
        End If
        areaIndex += 1

    End While

End Sub

Remarks

This property allows for:

  • the deletion or customization of map areas that have been been created for a chart object (any data point, series, legend item or strip line object that has a non-empty Href, MapAreaAttributes or ToolTip property will have an associated map area object).
  • the addition of custom legend items, which have a user-defined shape and coordinates.

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.