Click here to Skip to main content
15,895,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends!

I have a Dataset and need to bind Dataset to an Aspx Web chart controls(for Bar chart and Pie also) for my application..Can u suggest how to do so in detail..!!

Regards..
Ravi kamesh
Posted

1 solution

Have you even tried to google this to see what you find out on your own?


C#
DataTable dt = new DataTable();
dt.Columns.Add("Status");
dt.Columns.Add("Total");

dt.Rows.Add("Success", 34);
dt.Rows.Add("Missing", 2);
dt.Rows.Add("Failed", 10);

Chart1.DataSource = dt;
Chart1.Series["Series1"].XValueMember = "Status";
Chart1.Series["Series1"].YValueMembers = "Total";
Chart1.DataBind();


Source: http://stackoverflow.com/questions/2655262/aspchart-control-databind-pie-chart-from-datatable[^]
 
Share this answer
 
Comments
prk@cp 18-Jul-12 7:44am    
sry dear...Google not allowed in my company...
StianSandberg 18-Jul-12 7:53am    
wtf? ok, but did you get any help from my example? Or from the thread at stackoverflow?
prk@cp 19-Jul-12 0:23am    
No dear..its coming for Bar Chart...I need for Pie diagram...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900