Returns HitTest information using the click coordinates on the Chart image.
Syntax
Visual Basic (Declaration) | |
---|
Public Overloads Function HitTest( _
ByVal x As Single, _
ByVal y As Single _
) As HitTest |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As FpChart
Dim x As Single
Dim y As Single
Dim value As HitTest
value = instance.HitTest(x, y) |
Parameters
- x
- x-coordinate
- y
- y-coordinate
Return Value
HitTest
Example
This example uses the HitTest method.
C# | Copy Code |
---|
FpChart1.EnableClickEvent = true;
protected void FpChart1_Click(object sender, ImageClickEventArgs e)
{
HitTest hitTest = this.FpChart1.HitTest(e.X,e.Y);
this.Label1.Text = hitTest.ToString();
} |
Visual Basic | Copy Code |
---|
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
FpChart1.EnableClickEvent = True
End Sub
Protected Sub FpChart1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles FpChart1.Click
Dim hit As FarPoint.Web.Chart.HitTest
hit = FpChart1.HitTest(e.X, e.Y)
ListBox1.Items.Add(hit.ToString())
End Sub |
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