Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Bind chart to Observable Collection in Xaml
posted

Hi

I'm looking for an example of binding an observable collection to a Chart in xaml.

This is an app i'm playing around with and it supplies its data to the view using the MVVM pattern.  For the life of me i cannot find an example of how to do this.  Any example i come across has data hard coded into the xaml which i find really annoying - why not use northwind/adventureworks to show these examples?

I have a observable collection with products and quantities all i want to do is show the quantities for each product on a chart.  This will work if i just bind the itemsource of the chart to the observable collection.  but i want to show the product name along the x-axis and also in the legend.

Can anyone give me an example?

Thanks
Paul