Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select points in a ZedGraph graph by dragging the mouse

Tags:

c#

zedgraph

I would like to select points on my curve by dragging a square with my mouse. Of course I can build this myself, but I was wondering if it can be done easier?

like image 873
Enrico Avatar asked Sep 01 '10 20:09

Enrico


1 Answers

Unfortunately not. You would have to do it by yourself. ZG doesn't provide any more sophisticated tools for interaction.

You would probably need to subscribe for "mouse down" and "mouse up" events, perform the reverse transform of found points and then find all points in range (i.e. by searching inside the Points collection of your curve(s)).

Just remember, that the action you described is by default connected width zooming and you would have to disable it.

like image 57
Gacek Avatar answered Sep 24 '22 15:09

Gacek