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

ChartView Legend Item Click

1 Answer 150 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
KA
Top achievements
Rank 1
KA asked on 29 Jan 2015, 01:09 AM
Hello,

Is it possible to subscribe to a Button-Click Event on the Legend in the ChartView?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Marchev
Telerik team
answered on 02 Feb 2015, 09:32 AM
Hi Kumar,

The RadLegend is a separate control, not part of the ChartView.


By default, the legend items in the RadLegend do not have a button inside them, so you cannot get a button click event. You can use the ItemTemplate property of the legend control so that you plug in a button or you can use an implicit style targeting a LegendItemControl and attach an event handler to the MouseDown event:
<telerik:RadLegend.Resources>
 <Style TargetType="telerik:LegendItemControl">
  <EventSetter Event="MouseDown" Handler="legendItem_MouseDown" />

Regards,
Petar Marchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ChartView
Asked by
KA
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or