Drag and Drop A radChart Control in your Xaml file
<telerik:RadChart Name="radChartDemo" Width="400" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" />
In Xamal.cs Create User defined method LoadChart() like this-
private void loadChart()
{
DataTable tbl = new DataTable();
DataColumn col = new DataColumn("Value");
col.DataType = typeof(int);
tbl.Columns.Add(col);
col = new DataColumn("ExcerciseType");
col.DataType = typeof(string);
tbl.Columns.Add(col);
tbl.Rows.Add(new object[] { 30, "ExerciseA" });
tbl.Rows.Add(new object[] { 60, "ExerciseB" });
tbl.Rows.Add(new object[] { 10, "ExerciseC" });
SeriesMapping seriesMapping = new SeriesMapping();
seriesMapping.SeriesDefinition = new PieSeriesDefinition();
ItemMapping itemMapping = new ItemMapping();
itemMapping.DataPointMember = DataPointMember.YValue;
itemMapping.FieldName = "Value";
seriesMapping.ItemMappings.Add(itemMapping);
itemMapping = new ItemMapping();
itemMapping.DataPointMember = DataPointMember.LegendLabel;
itemMapping.FieldName = "ExcerciseType";
seriesMapping.ItemMappings.Add(itemMapping);
radChartDemo.SeriesMappings.Add(seriesMapping);
//RadChart1.DefaultSeriesDefinition = new PieSeriesDefinition();
radChartDemo.ItemsSource = tbl;
}
call LoadChart() method in Class constructor and you will see a pie chart at runtime.