trend equation

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
faruque
Newbie
Newbie
Posts: 3
Joined: Thu Oct 13, 2005 4:00 am

trend equation

Post by faruque » Mon May 21, 2007 10:49 am

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...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon May 21, 2007 1:47 pm

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();
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

faruque
Newbie
Newbie
Posts: 3
Joined: Thu Oct 13, 2005 4:00 am

Post by faruque » Tue May 22, 2007 8:20 am

thanks...

Post Reply