my bar is no fitting on my web page inside the table define.kindly asking for help on how to do it.below is my code for the taable definition and the code for the bar.
this is the code for the definition of the table
this is the code for the bar
string connect=TraceBizCommon.Configuration.ConfigSettings.ConnectionString;
SqlConnection conn = new SqlConnection(connect);
conn.Open();
SqlCommand cmd = new SqlCommand("select Customer,[Total Amount] from CustomerDebts ", conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
string[] x = new string[dt.Rows.Count];
decimal[] y = new decimal[dt.Rows.Count];
for (int i = 0; i
{
x[i] = dt.Rows[i][0].ToString();
y[i] = Convert.ToInt32(dt.Rows[i][1]);
}
BarChart1.Series.Add(new AjaxControlToolkit.BarChartSeries { Data = y});
BarChart1.CategoriesAxis = string.Join(",", x);
BarChart1.ChartWidth = (x.Length * 100).ToString();
BarChart1.ChartHeight = (y.Length * 75).ToString();
}
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
issacpalPosted Dec 20, 2017, 6:00 AM