Hi,
I'm just testing out Infragistics' UltraDataChart to see if it's the right product that my company needs.
I'm interested in retrieving the value of a ScatterLineSeries closest to my cursor at any given time. Yet this function keeps returning me NaN values for X and Y. I'm also interested in highlighting the marker of this point which is closest to my cursor too. Are these features available for a ScatterLineSeries in the UltraDataChart?
I got the highlighting layer series working for a Category LineSeries, but I need it for the ScatterLineSeries because I want to use a NumericXAxis.
Thanks for your help.
Hello Johannes,
Thank you for posting on our forums.
I will research to find the supporting properties/methods for implementing the mentioned ScatterLineSeries features. I will post a progress update on this by end of day tomorrow.
Please let me know if you have any questions.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
You can get the value of ScatterLineSeries closest to the cursor by doing these two steps:
1. Get the location of the mouse cursor in the chart data area. To do so handle the MouseClick event of the chart and get the CrosshairPoint of the chart. This will return you where the pointer is, nevertheless if you have turned on or off the crosshair. The result is a point with X and Y values from 0 to 1. Here 0,0 is the top left corner of data area and 1,1 is the bottom right corner;2. With CrosshairPoint.X in hand, you need to convert its value to match the XAxis value. To do so get the actual min and max value of the axis and calculate the value you need like this:
var xValue = (xAxis.ActualMaximumValue - xAxis.ActualMinimumValue) * position.X;
Please let me know if you need any assistance in implementing this.