reg : Pie Chart

2159
1
09-12-2010 10:16 PM
VikramS
Occasional Contributor
Hi all ,

Can anyone send a sample code to draw pie chart or bar chart for silverlight . That would be a great help . THanks
0 Kudos
1 Reply
AndrewChapkowski
Esri Regular Contributor
The best place to find charting examples would be at the Silverlight Toolkit Codeplex. There you can find all kind of interactive samples with code.

Here is a simple pie chart example:
            <!-- Typical Use -->
            <Grid Style="{StaticResource WrapperStyle}">
                <chartingToolkit:Chart Title="Typical Use">
                    <chartingToolkit:Chart.Series>
                        <chartingToolkit:PieSeries ItemsSource="{Binding PugetSound, Source={StaticResource City}}" IndependentValueBinding="{Binding Name}" DependentValueBinding="{Binding Population}"/>
                    </chartingToolkit:Chart.Series>
                </chartingToolkit:Chart>
            </Grid>



Where ChartingToolkit refers to:
xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" 


Hope this helps.
0 Kudos