I'm showing a chart with 2 LineSeries on it with different amount of points in each series. I'm padding the points in each series with double.NAN to establish the same amount of points in both series (I'm using CategoryDateTimeAxis).
When I'm showing TrendLine for 1 of the series the trend line is corrupted. (Trend line looks good when the chart containts only 1 series without padding)
Any suggestions will help
Thank you for your post!
I am somewhat unsure what you mean by the word "corrupted" in this case. I am currently under the impression that the meaning here is that the trendline is being drawn cross-chart, where there are null/padded values in the chart for a particular series. If this is what you mean, please understand that this is expected behavior. The trendline on a series in the XamDataChart is based on the ItemsSource that you have bound to it, so as long as there is a data item plotted in the chart in that source collection, the trendline will be drawn for it.
The way I see this, I believe your best option to work around this would be to either use different data sources for your series, which would require you to have multiple hidden but identical axes, or you can create your own series to serve as a custom trendline. Here is a link describing how to create a custom trendline: https://www.infragistics.com/community/blogs/b/kiril_matev/posts/working-with-built-in-and-custom-logic-trendlines-in-the-xamdatachart.
It is still possible that my definition of "corrupt" is not correct on this matter though. If I am under the wrong impression, could you please provide me with more detail, a screenshot, or a sample project that demonstrates what you are referring to?
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thanks for quick response.
I will try to work around this with your advice.
I will let you know if it helped.
I look forward to your response.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.https://www.infragistics.com/support
It has been awhile since I have last heard from you on this matter. Did you still require assistance?
Hi Andrew !
Sorry for the delayed response.
Well i've took your advice and changing between 2 data sources.
This seems to be working.