Spread for ASP.NET 10 Product Documentation
HitTest(Single,Single) Method
Example 


x-coordinate
y-coordinate
Returns HitTest information using the click coordinates on the Chart image.
Syntax
'Declaration
 
Public Overloads Function HitTest( _
   ByVal x As Single, _
   ByVal y As Single _
) As HitTest
'Usage
 
Dim instance As FpChart
Dim x As Single
Dim y As Single
Dim value As HitTest
 
value = instance.HitTest(x, y)
public HitTest HitTest( 
   float x,
   float y
)

Parameters

x
x-coordinate
y
y-coordinate

Return Value

HitTest
Example
This example uses the HitTest method.
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();
}
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 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FpChart Class
FpChart Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.