I have a map with a graphics layer and a feature data grid. The feature data grid has only two columns: area name and area value. I would like to create a column chart based on the data in the feature data grid, with area name (1st column) on the x-axis and area value (2nd column) on the y-axis (for example, county name and population 2000).
To accomplish this should I
a) bind the chart to the graphics layer on the map,
b) bind the chart to the feature data grid, or
c) bind the chart to a listbox that is created with the data?
I've tried different things, but can't it to work (I'm not very familiar with binding syntax).
<esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid"
Map="{Binding ElementName=MyMap}"
GraphicsLayer="{Binding ElementName=MyMap, Path=Layers.[MyGraphicsLayer]}" />
<toolkit:Chart Margin="10,4,0,0" Name="chart1" Title="Chart Title">
<toolkit:ColumnSeries ItemsSource="{Binding ElementName=MyMap, Path=Layers.[MyGraphicsLayer]}" IndependentValueBinding="{Binding [AreaName]}" DependentValueBinding="{Binding [AreaValue]}">
</toolkit:ColumnSeries>
</toolkit:Chart>
Thanks for your help...