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.
sabarishbabu
Top achievements
Rank 1
sabarishbabu asked on 24 Nov 2009, 02:15 PM
Hi,
 
 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;
                chartDef.PlotArea.XAxis.Clear();
                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
0
Chavdar
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,
Chavdar
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.
Tags
General Discussions
Asked by
sabarishbabu
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Share this question
or