I have a simple police application that allows officers to spatial select and query some points (police calls). I using esri FeatureDataGrid. I wanted to create a few simple charts and graphs and send the queried data (that is in the featuredatagrid) into these grids and charts. Currently I'm trying to send the selected GraphicLayer <esri:GraphicsLayer ID="MySelectionGraphicsLayer" />here's a small snip of my code behind to select the graphiclayer
GraphicsLayer selectionGraphicslayer = Map.Layers["MySelectionGraphicsLayer"] as GraphicsLayer;
selectionGraphicslayer.ClearGraphics();
I'm wondering if I'm binding it rightHere's my Pie Chart
<Grid Style="{StaticResource WrapperStyle}">
<chartingToolkit:Chart Title="AnimationSequence = FirstToLast" Palette="{StaticResource GrowPieDataPointPalette}" Style="{StaticResource ChartStyle}" MouseLeftButtonDown="OnMouseLeftButtonDown" Margin="1,4,-1,-4">
<chartingToolkit:Chart.Series>
<chartingToolkit:PieSeries ItemsSource="{Binding ElementName=Map, Path=Layers[MySelectionGraphicsLayer].Graphics}" DependentValueBinding="{Binding Attributes[DISPDESC]}" AnimationSequence="FirstToLast"/>
</chartingToolkit:Chart.Series>
</chartingToolkit:Chart>
</Grid>
My table works and here's how I'm binding that:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="15" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock x:Name="DataDisplayTitle" Text="Search Results" FontSize="9" Grid.Row="0" FontWeight="Bold" FontFamily="Arial" Foreground="#FFFFFFFF" />
<esriWidgets:FeatureDataGrid Grid.Row="1" x:Name="QueryDetailsDataGrid" Height="170"
Map="{Binding ElementName=Map}"
GraphicsLayer="{Binding Layers[MySelectionGraphicsLayer], ElementName=Map}" />
</Grid>
Does it seem like I'm binding the Pie Graph correctly because now app is not completely firing and its not really working; it is only selecting or creating one graphic. If I try to select 20 points only one gets selected and the featuredatagrid is not firing and showing up (ResultsDisplay.Visibility = Visibility.Visibility). Everything was working before so I'm wondering/thinking it is something with my pie chart.ThanksNat