[Suggestion] OnTrackedItemChanged in PlotModel

Aug 22, 2013 at 4:27 PM
Currently, there's no straightforward way to determine what item is currently being displayed in the tracker. It'd be pretty simple to add a virtual OnTrackedItemChanged method to the PlotModel class, then have the TrackerManipulator trigger it in the Delta and Completed methods.

That way, anyone subclassing the PlotModel could override that, and set properties that could be bound to in other parts of the GUI.

Added this myself locally, but I think others might find it useful if it was in the official build.

(By the way... Big fan of OxyPlot... Been using it professionally for a couple years now... Great library!)
Aug 22, 2013 at 7:04 PM
Edited Aug 22, 2013 at 7:04 PM
Good idea! I added a TrackerChanged event on the PlotModel. It also works on windows forms where the tracker is not yet implemented... :)
Aug 23, 2013 at 12:52 PM
Just tried it out in the latest build... Works perfectly, thanks :)
Sep 5, 2013 at 9:15 PM
Found a minor glitch. When you start filtering out items via the IsValidPoint override, the new event starts returning the wrong index/item. Easy fix, though. In XYAxisSeries.GetNearestPointInternal, add an "i++" before the "continue"
Sep 6, 2013 at 4:47 AM
thanks! fixed