title: EPPlus how to add trendline using ExcelChartTrendline?
body: <p>I need to add a trendline to an Excel scatterplot. There's a class in the EPPlus library - ExcelChartTrendline.cs - that is clearly intended to support this. There is also an Enum - eTrendLine that allows me to specify the type of line.</p>
  
  <p>The code for adding the scatterplot was simple and the chart renders fine:</p>
  
  <pre><code>var chart = worksheet.Drawings.AddChart(chartName, eChartType.XYScatter);
  </code></pre>
  
  <p>But after a many hours searching and tinkering I cannot figure out the syntax for adding the trendline.</p>