Hi team,
Hi elinder,
Let me know if you have any further questions on this matter.
The XamDataChart uses reflection in order to get the property values using the ValueMemberPath string, and reflection can't be used to get values from an ExpandoObject. Please see the following forum thread regarding this: http://es.infragistics.com/community/forums/t/48732.aspx
If you would like to see built in support for dynamic objects in the XamDataChart, I recommend that you submit this as a product idea at: http://ideas.infragistics.com
Hi Rob,
Your provided solution is great, We have one more issue with StackedFragmentSeries ValueMemberPath.
We have almost 10 StackedFragmentSeries, and we have a class that contains values like Value1 to Value10, and these values are assigned to StackedFragmentSeries ValueMemberPath (in sample application we use Value1, Value2 and Value3). Its working fine. But we want to use ExpandoObject to avoid defining large number of object properties, please see the employee, manager example from the following link
http://msdn.microsoft.com/en-us/library/system.dynamic.expandoobject(v=vs.100).aspx
By using this approach, XamDataChart is not displaying data, but this approach is working fine with ListBox.
can you please modify the sample by using ExpandoObject ?
It turns out I was wrong about the DataContext for your series Title binding. The StackedFragmentSeries object derives from DependencyObject so it doesn't even have a DataContext. This means it isn't going to inherit it's "parent's" DataContext, so your binding doesn't have any source. In order to bind this property, you are going to need to use a StaticResource binding. I've attached a modified version of the sample you sent me with the changes.
Regarding the datatemplate stuff, the templates you originally had threw me off because they used values from each series. So I was wondering why you needed to display a template for each StackedFragmentSeries if the content in the template was always the same. But your new sample shows that you changed the bindings to include the appropriate values based on the series. As such, I have modified your sample. It's not possible to assign DataTemplates directly to the series ToolTip property as it is expecting a UI control. The best you can do is move your templates into your Resources collection and then use the XAML code I sent you earlier on Oct 3rd. The code effectively does the same exact thing as before but it removes the templates from inside the XamDataChart XAML and allows you to put them into a resource dictionary so you can clean up the code some.
Your legend solution is great, but still we have some issues with other two points.
1. We want to display StackedFragmentSeries own value on mouse over, now i was defined tooltip of every StackedFragmentSeries, due to this approach we achieve desired results, but following this approach our code is redundant, we have almost 10 series and every series contains same tooltip code, only item.value changed, we want to replace this approach using DataTemplate like in previous sample application.
2. We tried to solve title binding according to your approach, but still not worked. Can you please modify the sample as you explained it in your previous reply?
I've attached a modified sample application.