You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have two LineSeries in your PlotModel, one is visible, the other is not. Give them a tracker to show, then add points in both of them, and switch the invisible LineSeries to visible after that. Then you will see the original visible one's tracker can be shown, the other can't
Steps to reproduce
Create a plotview, add two LineSeries, use Legend to controll their visibility to one visible, and the other isn't.
Add tracker and bind a tracker event to your LineSeires, Any tracker and any event will do.
Add points to those two LineSeires, use legend to let the invisible LineSeries be visible.
Then you will see the tracker dosen't show at the series that is used to be invisible.
And I think I found the problem.
https://github.com/oxyplot/oxyplot/blob/develop/Source/OxyPlot/Series/LineSeries.cs
At the line 300, it uses SmoothedPoints property to Get Nearest Interpolated Point. And when a LineSeries is invisible, it will not calculate it's SmoothedPoints, even if you use legend to show it. So its SmoothedPoints is empty here which causes its tracker doesn't show. Maybe the author should use ResetSmoothedPoints() method before the Get method or at the LegendHitTest.
The text was updated successfully, but these errors were encountered:
Zird231
changed the title
LineSeries Tracker doesn't show
LineSeries Tracker doesn't show (at wpf)
Nov 22, 2023
When you have two LineSeries in your PlotModel, one is visible, the other is not. Give them a tracker to show, then add points in both of them, and switch the invisible LineSeries to visible after that. Then you will see the original visible one's tracker can be shown, the other can't
Steps to reproduce
And I think I found the problem.
https://github.com/oxyplot/oxyplot/blob/develop/Source/OxyPlot/Series/LineSeries.cs
At the line 300, it uses SmoothedPoints property to Get Nearest Interpolated Point. And when a LineSeries is invisible, it will not calculate it's SmoothedPoints, even if you use legend to show it. So its SmoothedPoints is empty here which causes its tracker doesn't show. Maybe the author should use ResetSmoothedPoints() method before the Get method or at the LegendHitTest.
The text was updated successfully, but these errors were encountered: