title: Create excel graph with epplus
body: <p>here is what I have. I have an excel sheet with two column.
  Column 1 had descriptions for legend, like Category1 Category 2 etc.
  Column 2 has numbers with total count like 6,4,18 etc.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Category</th>
  <th>Count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Category1</td>
  <td>6</td>
  </tr>
  <tr>
  <td>Category2</td>
  <td>4</td>
  </tr>
  <tr>
  <td>Category3</td>
  <td>18</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I need to display a graph with the count values and display the category names for each line.
  I tried different values but I cannot figure it out.
  Here is my current code</p>
  <pre><code>        ExcelChart ec = (ExcelLineChart)chartSheet.Drawings.AddChart(&quot;chart_1&quot;,      
                          eChartType.Line);
              ec.SetPosition(1, 0, 3, 0);
              ec.SetSize(800, 300);
              var ran1 = chartSheet.Cells[&quot;A4:A6&quot;];
              var ran2 = workSheet.Cells[&quot;0:0&quot;];
  
              var serie1 = (ExcelChartSerie)ec.Series.Add(ran1, ran2);
              serie1.Header = chartSheet.Cells[&quot;A3&quot;].Value.ToString();
  
              ran1 = chartSheet.Cells[&quot;B4:B6&quot;];
              var serie2 = ec.Series.Add(ran1, ran2);
              serie2.Header = chartSheet.Cells[&quot;B3&quot;].Value.ToString();
  
              var xml = ec.ChartXml;
              var lst = xml.GetElementsByTagName(&quot;c:lineChart&quot;);
              foreach (System.Xml.XmlNode item in lst[0].ChildNodes) {
                  if (item.Name.Equals(&quot;ser&quot;)) {
                      foreach (System.Xml.XmlNode subitem in item.ChildNodes) {
                          if (subitem.Name.Equals(&quot;c:cat&quot;)) {
                              item.RemoveChild(subitem);
                              break;
                          }
                      }
                  }
              }
  </code></pre>
  <p>This gives me a line with counts, but does not display the category names like I wanted.</p>
  <p>Thanks in advance for any response.</p>