Gridline Annotaion on Click

3 posts, 0 answers
  1. Markus
    Markus avatar
    42 posts
    Member since:
    Nov 2012

    Posted 29 Oct 2013 Link to this post

    Hi,
    is it possible to add a vertical gridline annotation when the user clicks in the plot area?

    Regards Markus
  2. Milena
    Admin
    Milena avatar
    204 posts

    Posted 01 Nov 2013 Link to this post

    Hi Markus,

    I have attached a sample project, where you can find an implementation of dynamic adding of Annotation to the ChartView by user click.

    There are some things which you can take into consideration. The ChartView has an event MouseLeftButtonDown which you can use for adding the Annotation to the ChartView. If you want to add it to the current position of the mouse, you should use ConvertPointToData method, which takes a System.Windows.Point as an argument (position on the screen) and returns an object of type DataTuple. 
    The two properties of the DataTuple class (FirstValue and SecondValue) represent the coordinates on the Horizontal and the Vertical axes of the RadCartesianChart. 

    I hope this helps.

    Regards,

    Milena
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>

    take into consideration
    take into consideration
  3. UI for WPF is Visual Studio 2017 Ready
  4. Markus
    Markus avatar
    42 posts
    Member since:
    Nov 2012

    Posted 04 Nov 2013 Link to this post

    Perfect thank you!

    Regards Markus
Back to Top