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

Bar Chart in telerik reporting

1 Answer 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ganesan
Top achievements
Rank 1
Ganesan asked on 30 Jan 2013, 09:53 AM
Hi,

i am very new to telerik reporting, i need to develop a bar chart, based on the data from datatable.
my datatable design.

 

DataTable

 

 

dtStudent = new DataTable();

 

dtStudent.Columns.Add(

 

"Date", typeof(DateTime));

 

dtStudent.Columns.Add(

 

"Group", typeof(string));

 

dtStudent.Columns.Add(

 

"Score", typeof(double));


//data

 

dtStudent.Rows.Add(

 

"2013-01-12", "Drawing", 25.0);

 

dtStudent.Rows.Add(

 

"2013-01-12", "Music", 10.0);

 

 

 

//date2

 

 

 

 

 

dtStudent.Rows.Add(

 

"2013-01-13", "Drawing", 30.0);

 

dtStudent.Rows.Add(

 

"2013-01-13", "Music", 11.0);

 

 

 

//date3

 

 

 

 

 

dtStudent.Rows.Add(

 

"2013-01-14", "Drawing", 28.0);

 

dtStudent.Rows.Add(

 

"2013-01-11", "Dance", 40.0);

i need to display the chart as match as the attachment file Bar chart.

if any one help me with example will be very helpfull for me.

Thanks in advance..

 

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 01 Feb 2013, 05:19 PM
Hi Ganesan,

Since you need to group your data, you have two options:
  1. Use the DataGroupColumn Property and set it to Group. This way the chart will group the data according to the Group field of the data source. However, you will have no control over the creation of the series and no further modifications will be possible. 
  2. Create the chart programmatically. The programmatic approach gives you full control over the creation of the series and the items and allows you to make more customizations. For examples see:
You can also refer to the attached sample report.

 All the best,
Elian
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Ganesan
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or