Series Selection

2 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    1 posts
    Member since:
    Jun 2013

    Posted 25 Jul 2013 Link to this post

    Hello,

    I am currently working with the radcartesianchart control and I was wondering if there was a way to click on a ScatterSplineSeries to return the series name. Currently I have dots on the ScatterSplineSeries that I can click on(only the points, not the line) and that only returns the coordinates.


    Thanks,

    Nicolas
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 30 Jul 2013 Link to this post

    Hi Nicolas,

    Currently RadCartesianChart does not support this out-of-the-box, however you can easily achieve it by setting the IsHitTestVisible property of the Series to true and attaching to a mouse event: 
    <telerik:SplineSeries DisplayName="Series A" IsHitTestVisible="True"
            MouseLeftButtonDown="SplineSeries_MouseLeftButtonDown" />
    private void SplineSeries_MouseLeftButtonDown(object sender,
                                                 MouseButtonEventArgs e)
    {
        var series = (CartesianSeries)sender;
     
        MessageBox.Show(string.Format("{0} was clicked!", series.DisplayName));
    }

    I hope this helps.
     
    Regards,
    Petar Kirov
    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top