var valuesX = new List<double?>();
var valuesY = new List<double?>();
foreach (DataTable table in GlobalDs.Tables)
{
foreach (DataRow dr in table.Rows)
{
valuesX.Add(Convert.ToDouble(dr["SN"]));
if (!DBNull.Value.Equals(dr[ControlItemForChartDropDownList.SelectedValue.ToString()]))
valuesY.Add(Convert.ToDouble(dr[ControlItemForChartDropDownList.SelectedValue.ToString()]));
else
valuesY.Add(null);
}
}