Dundas Chart for ASP.NET
HitTest(Int32,Int32,Boolean) Method
See Also  Send comments on this topic.
Dundas.Charting.WebControl Namespace > Chart Class > HitTest Method : HitTest(Int32,Int32,Boolean) Method


x
The x-coordinate value of the point the user clicked on.
X coordinate
y
The y-coordinate value of the point the user clicked on.
Y coordinate
ignoreTransparent
Determines if transparent elements are ignored.
Indicates that transparent elements should be ignored.

Call this method to determine the chart element, if any, that is located at a point defined by given X and Y coordinates. Transparent elements can optionally be ignored.


This method is used for selection and it returns a selected object from x and y coordinates.

Syntax

Visual Basic (Declaration)  
Public Overloads Function HitTest( _
   ByVal x As Integer, _
   ByVal y As Integer, _
   ByVal ignoreTransparent As Boolean _
) As HitTestResult
Visual Basic (Usage) Copy Code
Dim instance As Chart
Dim x As Integer
Dim y As Integer
Dim ignoreTransparent As Boolean
Dim value As HitTestResult
 
value = instance.HitTest(x, y, ignoreTransparent)
C#  
public HitTestResult HitTest( 
   int x,
   int y,
   bool ignoreTransparent
)

Parameters

x
The x-coordinate value of the point the user clicked on.
X coordinate
y
The y-coordinate value of the point the user clicked on.
Y coordinate
ignoreTransparent
Determines if transparent elements are ignored.
Indicates that transparent elements should be ignored.

Return Value

A HitTestResult object, which provides information concerning the chart element (if any) that is at the specified location.


Hit test result object

Remarks

Call this method to determine the chart element (if any) that is located at a specified point.

To ignore transparent elements set ignoreTransparent to true.

IMPORTANT: for this method to work correctly the Chart.MapEnabled property must be set to false.

This method can be used with the Click server-side event when implementing drilldown. However, we HIGHLY RECOMMEND using client-side image maps for drilldown because of its ease of use.

The returned HitTestResult object's properties can then be used to determine what chart element was clicked on, and also provides an instance of the actual object selected (if any).

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.