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
40
Dynamically add axes to a chart using MVVM approach
posted

Hi,

I'm evaluating the silverlight libraries currently, with the view of porting our win forms application.

 

In our existing app, we dynamically define the axes for a chart through a dialog, then fetch the data and display it. The examples I have seen for xamDataChart show the axes defined in the xaml or in the code behind. However the code behind is referring directly to the xamDataChart object, rather than using some data binding to update the axes.

Is there any way to define the axes in the view model or model and then, through data binding or another approach, have the view update with the new axes information? We'd also want to do the same thing for the series, though the approach will be the same I'm guessing.

Note, we need to be able to unit test the result by defining a simple skeleton testing view, so defining in the view's code behind is not an approach we wish to persue.

Cheers.