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

Series Selection

1 Answer 108 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 25 Jul 2013, 06:57 PM
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

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 30 Jul 2013, 02:07 PM
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 >>
Tags
ChartView
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or