This is a migrated thread and some comments may be shown as answers.

get the mouse position on the plotarea

1 Answer 62 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Frans van Ek
Top achievements
Rank 1
Frans van Ek asked on 17 Jun 2010, 01:44 PM

Hi,

I would like to know if there's a way to get the mouse position after a click on the plot area.

I’ know there a way to get which element a click occurred but i want to know the position even when there isn't a element on that spot.

What i'm tring to achieve is to use the chart a input mechanism for the end user. By pointing with the mouse  (in the chart) the user can set a value within the chart.

any idea's would be appreciated,

Frans van Ek

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 22 Jun 2010, 07:53 AM
Hi Frans van Ek,

I am afraid this functionality is not supported out of the box. Still, it could be implemented with custom code. RadChart renders an image in the page. You can find the coordinates of the clicked point in the image and knowing the PlotArea Margins you can calculate the position within the PlotArea. Then you will be able to calculate the logical units which correspond to that position. You can check this article for more details on obtaining the coordinates of  the mouse in an image.

Regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart (Obsolete)
Asked by
Frans van Ek
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or