We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Get x/y value at y/x point?

Thread ID:

Created:

Updated:

Platform:

Replies:

89938 Sep 10,2009 11:13 AM Mar 17,2010 12:08 AM Windows Forms 8
loading
Tags: Chart
Markus Persson
Asked On September 10, 2009 11:13 AM

If I create a simple line chart, like this.

ChartSeries series = new ChartSeries("Series 1");
series.Points.Add(0, 500);
series.Points.Add(1,340);
series.Points.Add(3,440);
series.Type = ChartSeriesType.Line;


Are there any way for me to get the y-value at x = 2?

Maybe something like: chartControl1.Series(0).GetYValue(2); ?

Venkata Vijayaraj B [Syncfusion]
Replied On September 11, 2009 05:37 AM

Hi Markus,

Thanks for your interest in Syncfusion products.

Use the below code to get Y - Value at X = 2.

Dim y() As Double= chartControl1.Series(0).Summary.ModelImpl.GetY(2)
y(0) - 1st Y Value.
y(1) - 2nd Y Value.

Please let me know if this helps.

Regards,
Venkat.

Markus Persson
Replied On September 14, 2009 03:26 AM

This doesn't seems to help me.

I have this serie in my example:
Me.ChartControl1.Series(0).Points.Add(-20, 20)
Me.ChartControl1.Series(0).Points.Add(0, 15)
Me.ChartControl1.Series(0).Points.Add(20, 15)


And when I try:
Me.ChartControl1.Series(0).Summary.ModelImpl.GetY(18)


I get an error "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"

Expected output that I want is "15". (At x = 18, y is 15)

Venkata Vijayaraj B [Syncfusion]
Replied On September 14, 2009 07:18 AM

Hi Markus,

Sorry for the inconvenience caused. We don't have direct support to identify the particular Y value for particular X value which are not included to Series. It is possible to achieve through one workaround, I have attached a simple sample for your reference. You can modify the 'FindIntersectingPoint' method depend on your requirement to find the specific value.

Sample Link:
http://files.syncfusion.com/support/Chart.Windows/v7.3.0.20/F89938/F89938Sample/main.htm

Please let me know if this helps.

Regards,
Venkat.

Palak Jain
Replied On February 25, 2010 03:29 PM

I need to do the same thing. Get the value of Y at X.
But I cannot access the sample code provided in the previous post.

Venkata Vijayaraj B [Syncfusion]
Replied On February 26, 2010 05:15 AM

Hi Palak,

Sorry for the inconvenience caused.

Here is the updated link.
http://files.syncfusion.com/support/Chart.Windows/v7.3.0.20/F89938_New/F89938Sample/main.htm

Please let us know if this helps.

Regards,
Venkat.

Palak Jain
Replied On March 16, 2010 11:12 AM

I still can't open the link. I get the Page Not Found error.

Palak

Venkata Vijayaraj B [Syncfusion]
Replied On March 17, 2010 12:08 AM

Hi Palak,

Sorry for the inconvenience caused.

Kindly download the sample from the following link below.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=F89938_Sample-1139976731.zip

Regards,
Venkat.


Venkata Vijayaraj B [Syncfusion]
Replied On March 17, 2010 12:08 AM

Hi Palak,

Sorry for the inconvenience caused.

Kindly download the sample from the following link.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=F89938_Sample-1139976731.zip

Regards,
Venkat.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;