How to use PlotArea - MVVM style in omponent One

75 Views Asked by At

Am trying to use ComponentOne MVVM style (I want to stay away from having to write code behind). I was able to figure out from their samples how to use data binding to bind data from the ViewModel onto the view.

<c1:C1Chart x:Name="lineChart"
                ChartType="Line"  Data="{Binding ChartData}">

In my case, I want want to display multiple data series using one common axes. It looks like Plot Area does exactly that. But am unable to figure out the xaml that needs to be written to accomplish that. All the examples I have seen involves adding code in code behind.

Any ideas?

Thanks Kay

1

There are 1 best solutions below

0
On

Figured it out, I can do something like this

<c1:C1Chart x:Name="chart" View="{Binding ChartView}" Data="{Binding ChartData}"/>

And on my view model, ChartView is property of type ChartView to which I can add plot areas

Thanks Kay