poonwahj Posted December 21, 2009 Report Share Posted December 21, 2009 I noticed in another post that the ChartView was supposed to add support for ViewModel databinding to the series property on the Chart. This would be helpful for people authoring controls where the user can select which columns to visualize on the chart. I, however, have not found any real information on how to do this. I'm looking to databind to the X,Y and series properties of a chart, <cfx:ChartView x:Name="chart1" ItemsSource="{Binding Path=DataSource}" Gallery="Bar"> <cfx:ChartView.Series> <cfx:SeriesAttributes BindingPath="{Binding Path=Series1Column}" /> <cfx:SeriesAttributes BindingPath="{Binding Path=Series2Column}" /> </cfx:ChartView.Series> <cfx:ChartView.AxisX> <cfx:Axis AutoScale="True" DataPath="{Binding Path=XAxis}" /> </cfx:ChartView.AxisX> <cfx:ChartView.AxisY> <cfx:Axis AutoScale="True" DataPath="{Binding Path=YAxis}"/> </cfx:ChartView.AxisY> </cfx:ChartView> Although, it probably makes sense to have no YAxis value (Because that will be calculated automagically by the Series Values). This code doesn't work. How does one bind, in this way, to the Series Binding path, or even the SeriesAttributes object in a ViewModel? JP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.