Dundas Chart for ASP.NET
CustomizeMapAreasEventHandler Delegate
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace : CustomizeMapAreasEventHandler Delegate


sender

The root Chart object.

e

A CustomizeMapAreasEventArg object, used to customize the chart's MapArea objects that have been created for a chart element with a non-empty Href, Tooltip or MapAreaAttributes property.

Enterprise Edition Only Feature. Represents the method that will handle the CustomizeMapAreas event of the root Chart object.
Chart customize map areas event handler delegate.

Syntax

Visual Basic (Declaration)  
Public Delegate Sub CustomizeMapAreasEventHandler( _
   ByVal sender As Chart, _
   ByVal e As CustomizeMapAreasEventArgs _
) 
Visual Basic (Usage) Copy Code
Dim instance As New CustomizeMapAreasEventHandler(AddressOf HandlerMethod)
C#  
public delegate void CustomizeMapAreasEventHandler( 
   Chart sender,
   CustomizeMapAreasEventArgs e
)

Parameters

sender

The root Chart object.

e

A CustomizeMapAreasEventArg object, used to customize the chart's MapArea objects that have been created for a chart element with a non-empty Href, Tooltip or MapAreaAttributes property.

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
Private Sub Chart1_CustomizeMapAreas(ByVal chart As Chart, ByVal e As CustomizeMapAreasEventArgs) _ Handles Chart1.CustomizeMapAreas Dim areaIndex As Integer = 0 While areaIndex < e.MapAreasItems.Count ' remove areas if there is no tooltip set If e.MapAreasItems(areaIndex).ToolTip = String.Empty Then e.MapAreasItems.RemoveAt(areaIndex) areaIndex -= 1 End If areaIndex += 1 End While End Sub

Remarks

The declaration of your event handler must have the same parameters as the CustomizeMapAreasEventHandler delegate declaration.

When you create a CustomizeMapAreasEventHandler delegate, you identify the method that will handle the CustomizeMapAreas event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

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.