Hi,
Is there any possibility of Binding a collection of objects to XamDataChart series (LineSeries in general and ScatterSeries to be specific), which draws all series on chart and we don't have to define individual series separately? I actually can have undefined number of series and I don't want to generate series from Code side.
What are different possibilities in this scenario? Any help?
Hello Asim,
Thank you for your post. I have been looking into it and I can suggest you see this link from stackoverflow:
http://stackoverflow.com/questions/18857830/xamdatachart-with-unknown-number-of-series
where there is a sample showing how to bind the XamDataChart’s Series Property. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
This DataBinder solution was in my list but I thought there might be some other solution as well... So, tried posting it here, but it seems that we cannot do it without Dependency properties/code side.
Thanks for your support!
Currently we are using XamDataChart with StackedColumnSeries we defined all required StackedFragmentSeries in xaml (almost 10 series) with Tooltip of every series, we want to avoid hard coded StackedFragmentSeries and make them dynamically like DataBinder approach.
Any update ?
Hello,
If you don't want to deifne StackedFragments you can use the GroupBy Class to group your data. Here you can find more information about this:
http://ko.infragistics.com/community/forums/t/85128.aspx
Hi Stefan,
I was look into it and its look good but i was faced following issues, can you fix these ?
Thanks Stefan its solved my problem.
You can set the StackedColumnSeries' UseDefaultToolTip Property to true, but it won't look exactly like you want. This is why I suggested you follow the approach from this forum thread:
http://ko.infragistics.com/community/forums/t/73905.aspx
where it is explained how to create a custom tooltip.
Hello Stefan,
Thanks for support, I know very well how to handle events in MVVM, I was solved the legend title issue through LegendItemTemplate, and its look good i need only tooltip of every auto generated series, i didn't find any solution of auto generated series tooltip I was attached the modified sample with snapshot (red circled tooltip) in sample project folder, can you modified my attached sample with tooltip that i was shown in snapshot ? modified sample is really very helpful for me.
I attached the sample to this post. Also here:
http://social.technet.microsoft.com/wiki/contents/articles/18199.event-handling-in-an-mvvm-wpf-application.aspx
you can see how handle events in MVVM way, so you can use the approach from the forum I suggested you.
May be you forget to attached the sample application ?
In the link that you shared with me, StackedBarSeries are created in code behind file but we use pure MVVM, so we didn't follow that approach pleases see my previous post attached sample, in which i was used groupby in View Model, now i need only tooltip of every series that are auto generated through view model. How can we achieve this goal through MVVM ?