Is it possible to select a point and simply delete it off the graph so that the image can be saved without that point?
Asked
Active
Viewed 1,437 times
2
-
@everyone please to be answering immediately – Alex Gordon Oct 20 '10 at 18:37
-
2Yes Drill sgt. Would you like fries with that? – Mikos Oct 20 '10 at 20:44
-
@mikos please get me a sandwhich ASAP – Alex Gordon Oct 20 '10 at 20:58
1 Answers
3
You probably can do it in this way:
Subscribe for the MouseClick
event, find the nearest point and delete it.
Here you can find an example how to subscribe for event in ZedGraph
: http://zedgraph.org/wiki/index.php?title=Edit_Points_by_Dragging_the_Mouse [website down, link broken]
You will need to use FindNearestPoint
method to find clicked point. this method will return you the CurveItem
and ID
of the clicked point. You can delete it just by using the RemovePoint
method of the CurveItem
object.
Just remember, that after every change you need to call Invalidate
or Refresh
method of your control to refresh the chart.

Gacek
- 10,184
- 9
- 54
- 87
-
-
@Gacek Not sure if you're still in the zedgraph game.. http://stackoverflow.com/questions/23953879/working-with-zedgraph-xdate-values-to-set-majorminorstep-and-basetic-values-for – AnotherUser May 30 '14 at 12:01
-