Mschart get multiple series from Database
<p>Hello i'm trying to populate a mschart from sql but even if the series have different values the chart is the same. So all the series have the same line overlapping each other.</p>

<pre><code>sqlConnection.Open();
        SqlCommand cmd = new SqlCommand(query, sqlConnection);
        cmd.CommandType = CommandType.Text;
        cmd.CommandTimeout = 300;
        rdr = cmd.ExecuteReader();
         DataTable table = new DataTable();

        // Add three columns to the table.
        table.Columns.Add("Channel", typeof(String));
        table.Columns.Add("Date", typeof(String));
        table.Columns.Add("Value", typeof(Int32));


        // Add data rows to the table.
        while (rdr.Read())
        {

            table.Rows.Add(new object[] { rdr[0], rdr[1], rdr[2] });

        }
        chart1.DataSource = table;
        //add series
        for (int i = 0; i &lt; table.Rows.Count; i++)
        {
            if (chart1.Series.Where(x =&gt; x.Name == table.Rows[i][0].ToString()).Count() &gt; 0)
            {

            }
            else
            {
                chart1.Series.Add(table.Rows[i][0].ToString());

            }
        }
        //set x,y axis for each series
        for (int i = 0; i &lt; chart1.Series.Count; i++)
        {

            chart1.Series[i].XValueMember = "Date";
            chart1.Series[i].YValueMembers = "Value";

            chart1.Series[i].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;

        }
        chart1.DataBind();
</code></pre>

<p>Thanks in advance</p>
