ASP .net Bar chart Drawing


<legend>Result Status</legend>
<div align="center">
<asp:Chart ID="ChartSummary" runat="server" Height="306px" Width="489px">
<asp:Series Name="Series1">
<asp:ChartArea Name="ChartArea1">
<AxisX Title="Marks Range">
<AxisY Title="No. of Student">


private void viewSummary(String param)
string qs = "select * from dbo.fn_CenteralVivaGraphical('" + param + "')"; // table valued function call with passing parameter
DataSet ds = new DataSet();
ds = ClsCommon.GetAdhocResult(qs);
DataTable dt = new DataTable();
dt = ds.Tables[0];
if (dt.Rows.Count > 0)
ChartSummary.DataSource = dt; // data bind and drawing at drawing control
ChartSummary.Series["Series1"].XValueMember = "Ranger";
ChartSummary.Series["Series1"].YValueMembers = "StudentCount";
gvwCenteralViva.Visible = true;
btnSubmit.Visible = true;
ChartSummary.Visible = true;
ChartSummary.Visible = false;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s