Group: Forum Members
Last Active: 9 Years Ago
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
|