ObservableCollection<Table> mytable = new ObservableCollection<Table>();
SqlConnection myCon = new SqlConnection(str);
myCon.open();
SqlCommand cmd = new SqlCommand();
cmd = myCon.CreateCommand();
cmd.CommandText = "select Top 8 ID,Pres,speed from TbDr order by ID desc";
SqlDataAdapter ad = new SqlDataAdapter(cmd);
DataSet _dataset = new DataSet();
ad.Fill(_dataset, "mytable");
XYDataSeries ds = new XYDataSeries();
ds.ItemsSource = _dataset.Tables["mytable"].Rows;
ds.ValueBinding = new Binding("Pres");
ds.XValueBinding = new Binding("ID");
mychart.Data.Children.Add(ds);