get value from x-position
get value from x-position
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?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |