get the mouse position on the plotarea

Thread is closed for posting
2 posts, 0 answers
  1. Frans van Ek
    Frans van Ek avatar
    2 posts
    Member since:
    Mar 2010

    Posted 17 Jun 2010 Link to this post

    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

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 22 Jun 2010 Link to this post

    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
Back to Top