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

how can i attach click events to RadCartesianChart bar series

1 Answer 129 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ye
Top achievements
Rank 1
Ye asked on 07 Jan 2013, 03:55 PM
i have a bar chart that is 
RadCartesianChart.

and i define the template to bar. 

<DataTemplate x:Key="blueBar">
				<Rectangle Fill="#3399FF" MouseLeftButtonDown="Rectangle_MouseLeftButtonUp" MaxWidth="{Binding DefaultBarWidth, Mode=TwoWay,Source={StaticResource AppUtils} }"/>
			</DataTemplate>
i use code behind to create the bar series. when i click on the rectangle bar, there is not events call, and no results. can anyone tell me the reason or show me a way to archeive click events on the rectangle bar datapoint.

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Kirov
Telerik team
answered on 09 Jan 2013, 05:52 PM
Hi,

You need to set the IsHitTestVisible property of the series to true, because otherwise mouse events do not propagate to the series items visual presenters.

I hope this helps.
 
Regards,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Ye
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or