I have write below code in chart need datasource event for displaying pie chart..In pie chart I have get the data from xml...In pie chart each legend items labels present in the format of item1, item2,item3...but I want description column from xml as a label of each legend item...And also I want exploded a single slice from pie chart....can anyone help me? thanks....
string fileName = @"D:\text\jccantera\jccantera\jcc.xml";
var reader = new StreamReader(fileName);
XmlSerializer serializer = new XmlSerializer(typeof(NewDataSet));
var report = (NewDataSet)serializer.Deserialize(reader);
Telerik.Reporting.Processing.
Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
DataSet ds = report;
procChart.DataSource = ds.Tables[
"BillItemLine"];
ChartSeries series = new ChartSeries();
series.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels;
series.DataYColumn =
"ItemLineAmount";
series.Appearance.ShowLabelConnectors =
true;
series.DefaultLabelValue =
"#%";
series.Appearance.LabelAppearance.Distance =10;
series.Appearance.LabelAppearance.LabelConnectorStyle.Color = System.Drawing.
Color.CadetBlue;
series.Appearance.TextAppearance.TextProperties.Color = System.Drawing.
Color.Brown;
JCChart.Legend.Add(d);
JCChart.Series.Add(series);
procChart.DataSource = ds.Tables["BillItemLine"].DefaultView;
JCChart.DefaultType = Telerik.Reporting.Charting.
ChartSeriesType.Pie;