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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.

Get x/y value at y/x point?

Replies:

89938 Sep 10,2009 03:13 PM UTC Mar 17,2010 04:08 AM UTC WinForms 8
 Subscribe to this post Tags: Chart
Asked On September 10, 2009 03:13 PM UTC

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 09:37 AM UTC

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.

Replied On September 14, 2009 07:26 AM UTC

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 11:18 AM UTC

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.

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 08:29 PM UTC

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 10:15 AM UTC

Hi Palak,

Sorry for the inconvenience caused.

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 03:12 PM UTC

Palak

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

Hi Palak,

Sorry for the inconvenience caused.

Regards,
Venkat.

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

Hi Palak,

Sorry for the inconvenience caused.

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.