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. Image for the cookie policy date

Click points on Line

Hi there. I have got the following problem: My chart has to deal with several points and it is possible that there will be Lines and/or StepLines on the same chart. If I am clicking the Line, I will add a point to the Line (if I am clicking between two points) or I want to move the point I clicked. Is it possible to get the clicked series and pointIndex of the closest point if i click between points in a StepLine? Also I found out that one can click a Line if Line.Style.Testradius is not used, but this is not working in general (see attachment series[0] between point[0] and point[1]). Is there a way to click onto a line no matter which one and get back the needed information about seriesIndex and pointIndex? Please see the attachment for better understanding. Thanks in advance Timo

SF_Chart2.zip

4 Replies

GM Geetha M Syncfusion Team February 10, 2006 12:33 PM UTC

Hi Timo, You can get the closest series index and point index of all points of a particular series by increasing the value of HitTestRadius. The following code snippet illusrates this: chartLine2.Style.HitTestRadius = 20; As this property controls the circle around the datapoint, it can be used for a StepLineChart to get the index values. However as in case of Line chart, without specifying the HitTestRadius, you can get the index values by exactly clicking over the line. Please let me know if this helps you. Thanks and Regards, Geetha.


TG Timo Günther February 13, 2006 07:08 AM UTC

Hi, sorry but this didn''t help. The user should click onto a line and then decide what he want to do (because he should only get the context menu when he hit a line). With your code snipet the user can click everywhere onto the chart (if the HitTestRadius property is very high) and he will get the context menu (please see example above). If a Line is close to a StepLine, the Line will be found all the time, not the StepLine. Also the Line is not found everytime. In the Sample above one can see that it is not possible to hit the Line (Series 0) between point 0 and point 1. This is a realy big issue for me, it would be great if you can give me some more hints to solve this thing. Tanks in advance Timo


GM Geetha M Syncfusion Team February 17, 2006 12:54 PM UTC

Hi Timo, We regret for the delayed response. Thanks for the detailed information. I will create a feature request on this and will let you know as soon as it is implemented. Regards, Geetha


TG Timo Günther February 17, 2006 01:42 PM UTC

Hi, thaks a lot, I am looking forward for it. Greetings Timo

Loader.
Live Chat Icon For mobile
Up arrow icon