Problem displaying LineSeries in WPF
I'm using the library extensively to display spectral data, we just started noticing that our LineSeries appear to have little breaks in random places. We think maybe this is caused by the fact that we have more Datapoints than we have pixels in our display. Has anyone else run into this, or have any ideas how to fix it. As an example, in created a simple line series:
for(var i = 0; i < Model.Width; i++)
{
lineSeries.Points.Add(new DataPoint(i, 2));
}
in that example my Model.Width ends up being 1836, and my Monitor is 1920, and I see a bunch of these little breaks.
if I do:
for(var i = 0; i < Model.Width - 100; i++)
{
lineSeries.Points.Add(new DataPoint(i, 2));
}
The line appears perfect, with no breaks.
I'm attaching images of each.
Customer support service by UserEcho
It could have something to do with optimizations we did in the wpf render context
https://github.com/oxyplot/oxyplot/blob/develop/Source/OxyPlot.Wpf/CanvasRenderContext.cs#L35
https://github.com/oxyplot/oxyplot/blob/develop/Source/OxyPlot.Wpf/CanvasRenderContext.cs#L45
Thank you! It definitely appears to be related to that. I don't know enough about WPF to mess with it, but if I just set BalancedLineDrawingThicknessLimit = 0; to avoid using DrawLineBalanced and it does correct the problem. I tested this with some of our more intensive plots, and I didn't really notice any performance hit. Were there any specific cases that required that optimization?
Thanks again!
I think we had some problems with thin dashed lines in WPF.
http://oxyplot.codeplex.com/discussions/456679
https://github.com/oxyplot/oxyplot/commit/c769037d6a5a99e9baeacf5c41ab1e614aa071f0
I guess this is not a good solution, should we create an issue at github to investigate this closer?