title: Asp.Net chart with multiple series and multiple values on the y axis
body: <p>I have a datatable that looks like this:</p>
  
  <pre><code> Data      Value 1   Value 2     Value 3 
   series1     32        -2            46 
   series2    -62                      99
   series3     19        23            98
  </code></pre>
  
  <p>On the chart I will need it to look like this:</p>
  
  <pre><code>32 -2 46      -62    99       19 23 98
  series1        series2         series3
  </code></pre>
  
  <p>and the legend : value 1, value 2, value 3</p>
  
  <p>the codes I have tried:</p>
  
  <pre><code>private void LoadChartCurrencyTotal(DataTable initialDataSource)
      {
          DataTable pivotedDt = Pivot(initialDataSource);
          chart1.DataSource = pivotedDt;
          foreach (DataRow dr in pivotedDt.Rows)
          {
              Series series = new Series(dr["Data"].ToString());
  
              List&lt;string&gt; colNames = (from DataColumn col in pivotedDt.Columns where col.ColumnName != "Data" select col.ColumnName).ToList();
  
              series.XValueMember = "Data";
              series.YValueMembers = string.Join(",", colNames);
  
              chart1.Series.Add(series);
          }
          chart1.DataBind();
          FormatChart(chart1);
      }
  </code></pre>
  
  <p>this returns <code>Data points insertion error. Only 1 Y values can be set for this data series.</code> because of the joined column names.</p>
  
  <p>Also tried:</p>
  
  <pre><code>private void LoadChartCurrencyTotal(DataTable initialDataSource)
      {
          DataTable pivotedDt = Pivot(initialDataSource);
          foreach (DataRow pivotDr in pivotedDt.Rows)
          {
              Series serie = new Series(pivotDr["Data"].ToString());
  
              List&lt;decimal?&gt; colValues = new List&lt;decimal?&gt;();
              foreach (DataColumn col in pivotedDt.Columns)
              {
                  if (col.ColumnName != "Data")
                  {
                      //colValues.Add(pivotDr[col.ColumnName] != DBNull.Value
                      //                 ? decimal.Parse(pivotDr[col.ColumnName].ToString())
                      //                 : new decimal?());
                      decimal? colValue = pivotDr[col.ColumnName] != DBNull.Value
                                              ? decimal.Parse(pivotDr[col.ColumnName].ToString())
                                              : new decimal?();
                      serie.Points.AddXY(pivotDr["Data"], colValue);
                  }
              }
  
              //serie.Points.AddXY(pivotDr["Data"], string.Join(",", colValues));
  
              chart1.Series.Add(serie);
          }
          FormatChart(chart1);
      }
  </code></pre>
  
  <p>This compiles but the result is completly messed up: The legend sais series1, series2, series3 and the result is:</p>
  
  <pre><code>32 -62 19     -2    23     46 99 98
  series1         series2     series3
  </code></pre>
  
  <p>I get the results per column not per row.</p>
  
  <p>And the last I have tried is:</p>
  
  <pre><code>DataView pivotedDv = pivotedDt.AsDataView();
  chart1.DataBindTable(pivotedDv, pivotedDt.Columns[0].ColumnName);
  </code></pre>
  
  <p>but this only returns:</p>
  
  <pre><code>0.00       0.00      0.00
  series1    series2   series3
  </code></pre>
  
  <p>and the legend: 0.00</p>
  
  <p>Hope someone has a clue how this should be acomplished. but please, no drag and drop and click solutions, but code. 
  Thanks</p>