Hey,
Is there an easy way (boolean, or what have you..) to check if the user clicks in the actual chart area (so the area inside all 4 axes), rather than just the chart control?
Regards,
Chris.
clicked in chart area?
Hi Chris,
The easiest way I can think is verifying in OnMouseDown event if the mouse coordinates are in the ChartRect or not. Something like this:
The easiest way I can think is verifying in OnMouseDown event if the mouse coordinates are in the ChartRect or not. Something like this:
Code: Select all
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
Rectangle rect = tChart1.Chart.ChartRect;
Text = rect.Contains(new Point(e.X, e.Y)) ? "Mouse in ChartRect!" : "";
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |