I would like to create a pie chart just like the one here: http://demos.telerik.com/reporting/product-line-sales/demo.aspx
However, disappointingly, the video tutorial decided to skip the pie chart.
I want to display a pie chart with ProductName listed on the series, while Quantity is displayed on the chart. I am using a sqldatasource.
This is a sample of my data:
===============================
ProductName Quantity
===============================
Crips 12
Coke 7
Candy Bar 57
I've got so far as displaying the chart and listing ProductName on legend. However, instead of having the Quantity displayed on the chart like in the demo sample above, the ProductName was displayed instead.
This is the code for my chart:
Can anyone tell me how to produce the pie chart like the one in the demo sample?
I refuse to believe that I'll have to data bind the chart to generic object list as mentioned by the last reply in this thread (http://www.telerik.com/community/forums/reporting/telerik-reporting/pie-chart-with-value-displayed.aspx) just to achieve this simple functionality.
Thanks.
However, disappointingly, the video tutorial decided to skip the pie chart.
I want to display a pie chart with ProductName listed on the series, while Quantity is displayed on the chart. I am using a sqldatasource.
This is a sample of my data:
===============================
ProductName Quantity
===============================
Crips 12
Coke 7
Candy Bar 57
I've got so far as displaying the chart and listing ProductName on legend. However, instead of having the Quantity displayed on the chart like in the demo sample above, the ProductName was displayed instead.
This is the code for my chart:
this.chart3.BitmapResolution = 96F;
this.chart3.ChartTitle.Appearance.Visible = false;
this.chart3.ChartTitle.Visible = false;
this.chart3.DataSource = this.sqlDataSource1;
this.chart3.DefaultType = Telerik.Reporting.Charting.ChartSeriesType.Pie;
this.chart3.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
this.chart3.IntelligentLabelsEnabled = true;
this.chart3.Legend.Appearance.Border.Visible = false;
this.chart3.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.1000000610947609D), Telerik.Reporting.Drawing.Unit.Inch(0.20000012218952179D));
this.chart3.Name = "chart3";
this.chart3.PlotArea.XAxis.MinValue = 1D;
chartSeries1.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels;
chartSeries1.DataLabelsColumn = "ProductName";
chartSeries1.DataYColumn = "Quantity";
chartSeries1.Name = "Series 1";
chartSeries1.Type = Telerik.Reporting.Charting.ChartSeriesType.Pie;
this.chart3.Series.AddRange(new Telerik.Reporting.Charting.ChartSeries[] {
chartSeries1});
this.chart3.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(5.0000004768371582D), Telerik.Reporting.Drawing.Unit.Inch(2.8999998569488525D));
Can anyone tell me how to produce the pie chart like the one in the demo sample?
I refuse to believe that I'll have to data bind the chart to generic object list as mentioned by the last reply in this thread (http://www.telerik.com/community/forums/reporting/telerik-reporting/pie-chart-with-value-displayed.aspx) just to achieve this simple functionality.
Thanks.