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
335
Chart with two Series
posted

Hi,

I have attached a simple Project, where I would like to display two data series in one chart. It works if I create the DataContext in the Code Behind file (MainWindow.xaml.cs). But I want to set the DataContext for the XamDataChart in the xaml file (MainWindow.xaml). For this I added

            <ig:XamDataChart.DataContext>
                <local:ChartViewModel/>
            </ig:XamDataChart.DataContext>

But I doesn't work. I'm sure there is a simple solution, but I can't figure it out.

Thanks for your help.

Thomas

ChartWithTwoSeries.zip