本文介绍了如何将数据集绑定到Aspx Web图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们!
我有一个数据集,需要为我的应用程序将数据集绑定到Aspx Web图表控件(也适用于条形图和Pie).
问候..
Ravi kamesh
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
推荐答案
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();
来源: http://stackoverflow.com/questions/2655262/aspchart-control- databind-pie-chart-from-datatable [ ^ ]
Source: http://stackoverflow.com/questions/2655262/aspchart-control-databind-pie-chart-from-datatable[^]
这篇关于如何将数据集绑定到Aspx Web图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!