Under review

Problem displaying LineSeries in WPF

Mark Abermoske 5 years ago in Bugs updated by Oystein Bjorke 5 years ago 3

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.

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.



I guess this is not a good solution, should we create an issue at github to investigate this closer?