Victor B.
Lake Forest, CA
Jul 18, 2011
93
Posts
Re: Removing a plotted point from a chart
Interesting problem, Alex. I came up with a quick solution, but you may have to adapt it a bit to make it fit your situation. You will need to create two overlapping plots on your chart. The red plot will contain all of the data and the green plot will only contain one point, which is the current/active point. I have attached the example to this post.
Summary:
-Create two plots on your chart, make the red plot first on the chart list and the green plot second. This will make sure that green overlaps red.
-Save all the data for the red plot into an array (I used program variable 'adData')
-In the forms OnLoad event, initialize a current point variable to 0 (Form variable 'lCurrentX'). This variable will be used to keep track of the green point.
-In the form's OnKeyDown event, update the current point variable (In the example, F2 goes forward, F1 goes back)
-Each time the current point is updated, update the Green Plot using the red plot array and the current point variables. Make sure you clear data so you erase the previous green point.
Regards,
Victor Brode
File Attachment:
GreenPlotUpdate.rar