Page 1 of 1
trend equation
Posted: Mon May 21, 2007 10:49 am
by 9638793
i can hopefully generate trend line series using Function but i can not get the trend line equation like Excel.
How can i display trend line equation?
please help me...
Posted: Mon May 21, 2007 1:47 pm
by narcis
Hi faruque,
Yes, this is possible using CalculateTrend method and something like this:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
bar1.FillSampleValues();
double m = 0;
double b = 0;
trendFunction1.CalculateTrend(trendFunction1.Series, 0, trendFunction1.Series.Count - 1, ref m, ref b);
label1.Text = "y = " + b.ToString() + "x + " + m.ToString();
}
Posted: Tue May 22, 2007 8:20 am
by 9638793
thanks...