Page 1 of 1

How to find the values of the y axis against a specific valu

Posted: Tue Feb 20, 2007 1:11 pm
by 9525868
I have plotted some line series and now after my calculation on the series i want the value of the Y axis against the specific X axis (on one of the series)
Eg Value of the Y at X(Bottom)=5

Posted: Wed Feb 21, 2007 9:06 am
by 9348258
Hi Samir

You can use the "XValues.IndexOf" and "YValues[index]" properties as below code, to calculate a specific point:

Code: Select all

int index = line1.XValues.IndexOf(Convert.ToDouble(textBox1.Text));
label2.Text = line1.YValues[index].ToString();
You may also be interested in checking the "What's New?\Welcome !\New in Series\Interpolating line series" example at the features demo. You'll find the demo at TeeChart's program group.

Posted: Fri Mar 23, 2007 6:28 am
by 9525868
Thanks But this is still did not help me i still have to find the values with the help of the cursor. the indexof property is not there in vb.net 1.1

Let me tell you my problem
I have plotted a line series with some values
Now i need to find a value at a given parameter eg at 2.5 and 3.5
these parameters are the X Axis values which came after some calculations on the data of the series it can vary according to the series data

Now i have a seroes and some points where i need the value to be read . I can read the value with the help of the cursor easily eg Using two labels to display values of the cursor movement .But I need to get the value automatically passed to the any other label or in a message box . In this i have only a location on X Axis (2.5 or 3.5) and taking this point i need the value of the Y Axis of the series plotted

Posted: Fri Mar 23, 2007 8:24 am
by narcis
Hi samir,

In Microsoft .NET Framework v1.1 IndexOf method exists as you can see here:

ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemArrayClassIndexOfTopic.htm
(paste the URL in Internet Explorer).

It is still not clear to me what are you exactly trying to achieve. However, what's in the What's New?\Welcome !\New in Series\Interpolating line series example in the features demo may help you.

You'll find the demo at TeeChart's program group.