Hello!
I'm trying to make a histogram-style graph, and I'm using ColumnSeries for it. I have about 15k points on the X axis, and with this amount of data the performance of the chart is VERY bad. Chart filling takes about 20 seconds, and zooming is very very slow, so the chart is impossible to use.
ItemsSource is set to ICollectionView, which is used for filtering values.
I tried another types of charts which performed better, but a ColumnSeries is still much more preferable to use (PointSeries are not a histogram-style and with StepAreaSeries it isn't possible to distinguish one point from another when many of them have the same value).
So, what can I do about this? How to make ColumnSeries possible to use with this amount of points? It appears that chart doesn't hide some of the columns like points in the PointSeries, and I think that it might affect performance.
Please help me!
Hello Vasily,
I have been looking through your post and I have contacted our development team for more information about improving the performance of the XamDataChart when ColumnSeries are used. I will update this forum thread soon.
Thank you for your patience.
Would you provide me the version of the XamDataChart that you are using?
Thank you.
I am using xamDataChart from 12.2 release. I've updated it recently in hope that the problem will go away, but unfortunately it didn't.
Hello,
In order to do some further testing I have made a sample project with ColumnSeries in XamDataChart using v12.2. On my side chart filling takes one or two seconds and seems that the zooming is fast. Would you please run the attached project and let me know if the visualization of the data takes more time or send me your sample project representing the issue so that I could provide you a better solution? Thank you.
Thank you for your feedback. I am glad that you resolved your issue.
When setting the minor gridlines to transparent, they are still being rendered and that might be causing the slow performance you have described. The property MinorStroke could be set to null or unset as you have done. This will stop gridlines of being rendered and will decrease the time for visualization.
Please feel free to let me know if you have any other questions on the matter.
Your sample really works great!
So, I did some research and with profiling I found that 95% CPU was used by System.Windows.Media.GeometryCollection.AddHelper(class System.Windows.Media.Geometry) function. Finally, I found that the reason was a little thing: MinorStroke="Transparent".
Removing this attribute worked perfectly! Seems that someone used that trick to make sure that there`ll be no minor strokes :) I think that instead invisible minor strokes was generated in gigantic quantities, and this was the cause of the problem.
But in your sample I saw that you use xAxis.MajorStroke = new SolidColorBrush() { Color = Colors.Transparent };. So, setting strokes to transparent is bad or is it xamDataChart handles strokes too slow?
Thank you for your help!