Make legend unclikable

2 posts, 0 answers
  1. Jérémy
    Jérémy avatar
    20 posts
    Member since:
    Feb 2015

    Posted 03 Jun 2015 Link to this post



    I search a lot but I don't find a way to "disable" the click event on a legend of a chart. I don't want my user could click on the legend.


    Could you please help me ?



  2. Vessy
    Vessy avatar
    1641 posts

    Posted 05 Jun 2015 Link to this post

    Hi Vallin,

    You can attach an event handler to the legendItemClick event and prevent the default behavior (show/hide the corresponding pie segment). You can have a similar implementation:
    <telerik:RadHtmlChart runat="server" ID="PieChart" Width="800" Height="500" Transitions="true">
    <script type="text/javascript">
        function pageLoad() {
            //get a reference to the chart
            var chart = $find("<%=PieChart.ClientID%>");
            //attach an event handler
            chart.get_kendoWidget().bind("legendItemClick", function (e) {

    I hope this approach is suitable for your scenario.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top