DataBind metodu
Şöyle yaparız.
Şöyle yaparız.
var query="select a,b,c from abc";
SqlCommand cmd = new SqlCommand(query, conn);
DataTable dt = new DataTable();
dt.Load(cmd.ExecuteReader());
Chart1.Series.Add("test");
Chart1.Series["test"].XValueMember = "a";
Chart1.Series["test"].YValueMembers = "b";
Chart1.DataSource = dt;
Chart1.DataBind();
Hiç yorum yok:
Yorum Gönder