get value from x-position

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
joachim
Newbie
Newbie
Posts: 9
Joined: Thu Feb 05, 2004 5:00 am

get value from x-position

Post by joachim » Fri Feb 25, 2005 9:12 pm

I have a fastline series and add a point to x=1; y=10 and x=4; y=13. Now I nee do know the value of Y at x=2. Is there a Method that I can call?

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 Feb 28, 2005 12:00 pm

Hi Joachim,

You will need to calculate this value. In your case the following code works but for more generic cases you will need to calculate the line properties like explained here.

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{	int x0=1,y0=10,x1=4,y1=13,x=2,y,c;

			fastLine1.Add(x0,y0);
			fastLine1.Add(x1,y1);

			c=y0-x0;

			y=x+c;

			tChart1.Header.Text = y.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

Post Reply