I am using ZDRAF to draw my plots in seed. I need to know that how can I do that time by which the mouse was clicked (bar chart)? Is there a way to get a point from a point and for example the color of the change bar?
Use MouseClick to find the event and the X and Y coordinates of that point, Where you clicked:
zg1.MouseClick + = New MouseEventHandler (zg1_MouseClick3); Private Zero Zg1_MouseClick3 (Object Sender, MouseEventArgs e) {PointF pt = (PointF) e.Location; Double X, Y; (ZAgraph Control) sender). MasterPan [0] .Most of the transformers (PT, Out X, Out Y); // something with x and y}} Note, I think we are working on the first pane (index 0) but if this is not your case, then you The pane which was clicked on the search was clicked (see this).
When you have the position of X and Y, you can easily guess which time the click was done and with that information you should do whatever you need.
Comments
Post a Comment