I am struggling with SqlDataReader and ChartControl. I have added one line without any problem, but i want to add multiple of them and can't do that at all altought I was searching for that all day long.
What I have is table with some names of columns id, date, value1, value2, value3. I am getting them using SqlDataReader.
SqlConnection con4 = new
SqlConnection(ConfigurationManager.ConnectionStrings["przychodniaConnectionString1"].ConnectionString);
string cmdStr4 = "select badCisData, badCisSkurczowe, badCisRozkurczowe, badCisPuls from badanieCis where pacID='" +
Label3.Text + "' ORDER BY badCisData ASC";
SqlCommand getResults = new SqlCommand(cmdStr4, con4);
con4.Open();
SqlDataReader reader = getResults.ExecuteReader();
Then I am making my chart like that:
Chart2.Series["Series1"].Points.DataBindXY(reader, "badCisData", reader, "badCisPuls"); Chart2.Series["Series2"].Points.DataBindXY(reader, "badCisData", reader, "badCisSkurczowe");
And I have error on Series2. I would like to put date on x axis and on y axis (value1, value2 etc.)