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.

Highlighting nearest Datapoint

Thread ID:

Created:

Updated:

Platform:

Replies:

91018 Oct 29,2009 03:03 PM Nov 5,2009 12:24 AM WPF 4
loading
Tags: Chart
Matthew Monks
Asked On October 29, 2009 03:03 PM

Hi,
We are trying to highlight the nearest datapoint in a wpf line chart, and all our attempts have been unsuccessful.
The chart consists of 3 series of points. We have a tooltip when you hover a point (using the highlight property), but another requirement states that we should highlight the nearest point of the series when the mouse is not over the series.
Requirement: When the mouse is placed over the main chart area, the closest data point in terms of time should be highlighted with a small circle on each time series. This is done by taking only the x axis value of the mouse pointer position and highlighting the data point on each time series that has the closest x axis value on the chart. As the mouse pointer is moved around, the highlighted data points change in real time.
(note: Google finance has a good example of this.)

If there’s an easy way please let us know.
For what I could see, maybe we could achieve it if we could get the screen coordinates of an IChartDataPoint, but the X, Y on that class are not screen coordinates. Another way could be to get the ChartSegment of a point (point.ParentSegment it’s always null… maybe there’s something missing in my template?)

Any help will be appreciated.
Regards

C. Sudha [Syncfusion]
Replied On October 30, 2009 07:11 AM

Hi Matthew,

Thanks for choosing Syncfusion product.

I am working on this. I will update you on monday with the sample. Thanks for your patience.

Please let me know if you have any questions.

Regards,
SudhaC.

Matthew Monks
Replied On November 3, 2009 05:53 AM

Hi Sudha,

Any updates on this issue?

Thanks!

Poorani Idhaya Bala M.A [Syncfusion]
Replied On November 4, 2009 09:01 AM

Hi,

Thanks for choosing Syncfusion Products.

Sorry for the delayed update.I am working on this.I have completed the sample,but some issues are there.So, I will update you the sample by tomorrow.

Thanks,
Poorani


Poorani Idhaya Bala M.A [Syncfusion]
Replied On November 5, 2009 12:24 AM

Hi Matthew,

Thanks for choosing Syncfusion Products.

Sorry for the delayed update.

You can achieve your requirement using the chart annotation labels.Please find the attached sample.

Please test this at your end and let me know if you have any questions.


Thanks,
Poorani



CS_748de96f.zip

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.

;