I have a XamDataChart that initially displays one set of data in two distinct lines. When I widen the chart, it morphs to display a single line. It seems to do this when there is a lot of data being displayed in the chart and not much room to display it. I’ve attached a project to display the anomaly.
Bump,
I have the same issue.
It appears to me if there are too many points to display the rendering of the chart line gets messed up a bit and makes it appear as though there were two lines.
Hi,
This is actually the intended behavior of the chart. If there are too many points to display such that they would just be rendering on top of eachother, the chart will show you a banded range to show you the difference between the high and the low values for that pixel. I've modified the colors in your chart so that you can see the range clearly:
In the above, the lighter red represents areas where there is a lot of difference betwee the high and low values over a small space. If the chart were to just draw all of the meanderings of the line, you would just see a dark mess of red, and performance would decrease due to the amount of geometry passed to WPF. The thicker the band is, the greater the spread between the high and low values. If you let your eye follow the top peaks of the light red, this is all the maximum values of the series, while if you let your eye follow the bottom peaks of the light red, this is all the minimum values of the series.
You normally wouldnt see this lighter band in your chart, but because you data varies so wildly over small amounts of space you can see thick sections of the band where the difference between the low values and the high values is great. If you were to zoom in on the chart, the thickness of the band would decrease as there is more space to show more individual points, until you reached a high zoome level where all the points would resolve.
Increasing the size of the chart also gives it more space to draw all the points, so you'll see the lighter band diminish as you stretch the chart horizontally.
Hope this helps!
-Graham