This is a migrated thread and some comments may be shown as answers.

Showing pie chart based on DatagroupColumn

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
sabarishbabu asked on 24 Nov 2009, 02:15 PM
 i want to show the pie chart based on DataGroupcolumn

3 columns -
1.resource name - legend
2. usage time - Y axis
3. Date - X axis
Line chart is showing correctly,This is the coding i used(displaying number of lines based on resources)

                 DataSet dsChart = new DataSet();
                Telerik.Reporting.Processing.Chart chart = (Telerik.Reporting.Processing.Chart)sender;
                Telerik.Reporting.Chart chartDef = (Telerik.Reporting.Chart)chart.ItemDefinition;
                dsChart = DBMethods.GetDetailsForInstrumentUsageByDateChart(facilityId, fromDate, toDate, isActual, resourceId);
                (sender as Telerik.Reporting.Processing.Chart).DataSource = dsChart;
                chartDef.DefaultType = Telerik.Reporting.Charting.ChartSeriesType.Line;
                chartDef.DataGroupColumn = "resource_name";
                chartDef.AutoLayout = true;
                chartDef.IntelligentLabelsEnabled = true;
                chartDef.Legend.Appearance.GroupNameFormat = "#VALUE";//this will display the usage time
                chartDef.PlotArea.XAxis.DataLabelsColumn = "date";

How to show the pie chart based on those three fields?

Thanks for any help

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 26 Nov 2009, 12:43 PM
Hi sabarishbabu,

Both chart types are not completely interchangeable and you will lose information with the pie type. Please, clarify exactly how do you expect the pie series to be rendered given your data.

Best wishes,
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question