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!
Hi Stefan,
I was look into it and its look good but i was faced following issues, can you fix these ?
Any update ?
Hello,
I have been looking into the sample and I modified it, so now the labels of the Series are displayed as you want. basically I changed the values in the DataSource. As for the legend series titles, I handled the StackedColumnSeries' SeriesCreated event and in the handler I set the Title. For the Tooltip you can see this forum thread:
http://es.infragistics.com/community/forums/t/73905.aspx
where it is explained how to create a custom tooltip when using GroupBy. Also I can suggest you ask Graham what is the purpose of the the Assignation Property, but i believe it is added so the DataSource could be used with other type of Series, too.
Hope this help 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 ?
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.
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:
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.