Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
Chart and dates on x axis
jesper
Oct 15 2013 5:40 AM
823
Reply
well.. i have a chart, have written this:
DataAccess dt = new DataAccess();
SqlConnection conn = dt.connection();
conn.Open();
string sqlStr = "SELECT Date, Counts FROM Chart";
SqlDataAdapter myCommand = new SqlDataAdapter(sqlStr, conn);
DataSet ds = new DataSet();
myCommand.Fill(ds);
DataView source = new DataView(ds.Tables[0]);
Chart1.DataSource = source;
Chart1.Series[0].XValueMember = "Date";
Chart1.Series[0].YValueMembers = "Counts";
Chart1.DataBind();
in my database i only have 1 date currently. and still when i compile and see it, on the x axis i have i dates starting from yesterday end date tomorrow..
why dosent it not just show the date(s) from the database. ?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Properties vs Public variables inside the class
Error in retrieve the image from sql table to picturebox?