NHitTestResult[] alway empty


Author
Message
François Chauvineau
François Chauvineau
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 2
Hi,

I try to select points of my chart.

I draw an rectangle and obtains the coordinate of my rectangle.

Then, I use the method HitTest of my ChartControl, and obtains always no results.
Here is my code :

void customDataZoom_EndDrag(object sender, EventArgs e)
{

//PointDebut is define on mouse down
PointFin = new Point(Cursor.Position.X, Cursor.Position.Y);

Point monPointDansGraphDeb = nChartControl1.PointToClient(PointDebut);
Point monPointDansGraphFin = nChartControl1.PointToClient(PointFin);

NRectangleF maZone = new NRectangleF((float)monPointDansGraphDeb.X,
(float)monPointDansGraphDeb.Y,
Math.Abs((float)monPointDansGraphDeb.X - (float)monPointDansGraphFin.X),
Math.Abs((float)monPointDansGraphDeb.Y - (float)monPointDansGraphFin.Y));
NHitTestResult[] mesPoints = nChartControl1.HitTest(maZone, true);

//--> mesPoints is alway empty

}

Thanks for your help.
François


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search