how can i attach click events to RadCartesianChart bar series

2 posts, 1 answers
  1. Ye
    Ye avatar
    25 posts
    Member since:
    Aug 2012

    Posted 07 Jan 2013 Link to this post

    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.
  2. Answer
    Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 09 Jan 2013 Link to this post

    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.

  3. DevCraft banner
Back to Top