Steps to reproduce
- Add some
double.NaN points to an empty line series (which is using smoothing).
- Crash.
Platform.
.NET version: .NET 6
Expected behaviour
The application should not crash, plot should stay unchanged.
Actual behaviour
The application crashes with the following exception and stack trace
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Min[TSource](IEnumerable1 source, Func2 selector)
at OxyPlot.Series.LineSeries.UpdateMaxMin() in C:\Users\Murdo\source\repos\oxyplot\Source\OxyPlot\Series\LineSeries.cs:line 426
at OxyPlot.PlotModel.UpdateMaxMin(Boolean isDataUpdated) in C:\Users\Murdo\source\repos\oxyplot\Source\OxyPlot\PlotModel\PlotModel.cs:line 1171
at OxyPlot.PlotModel.OxyPlot.IPlotModel.Update(Boolean updateData) in C:\Users\Murdo\source\repos\oxyplot\Source\OxyPlot\PlotModel\PlotModel.cs:line 801