title: linear regression/trend line with ms charting
body: <p>I have data that are numbers both on x and y and have charted them using <a href="http://code.msdn.microsoft.com/mschart" rel="nofollow">mschart 4.0</a></p>
  
  <p>I need to add a trend line/linear regression to a bunch of points I have.  The data on x and y are both numbers (no dates anywhere), for instance (33.4,45.1) would be a point.</p>
  
  <p>In the samples I downloaded from the first link I found a linear regression sample in the code files forecasting.aspx(.cs), and I found this <a href="http://msdn.microsoft.com/en-us/library/dd456655.aspx" rel="nofollow">ms documentation</a></p>
  
  <p>I have added a linear regression line to the chart with the following line (once all other data it setup etc)</p>
  
  <pre><code>Chart1.DataManipulator.FinancialFormula(FinancialFormula.Forecasting, parameters, "Input:Y", "Forecasting:Y,Range:Y,Range:Y2");
  </code></pre>
  
  <p>The problem with both of these is that they assume dates are used.  I went ahead and implemented it anyway, but my regression line starts at around the x value of 20, and will go to an x value of the max x value of one of the points (almost 70) if I give the parameter Period a value of 700.  But since it doesn't start at x value 0 I don't trust it is correct.</p>
  
  <p>Anyone have any idea on how to implement this?</p>