Page 1 of 1

get value from x-position

Posted: Fri Feb 25, 2005 9:12 pm
by 8725765
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?

Posted: Mon Feb 28, 2005 12:00 pm
by narcis
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();
		}