RadChart ChartClickEventHandler Chart Title and Legend Clickable

Thread is closed for posting
3 posts, 0 answers
  1. Katie Arnott
    Katie Arnott avatar
    25 posts
    Member since:
    Dec 2009

    Posted 25 Mar 2011 Link to this post

    Is there a way to disable the Chart Title and Chart Legend to NOT be clickable when assigning the Chart a Click event? 

    Putting a click event on the item, does not seem to work from code behind.
    - item.ActiveRegion.Click += new RegionClickEventHandler(BaseItem_Click);
    Item is clickable, but method never gets fired.

    I'm using Telerik RadControls for ASP.NET Ajax - version 2010.3.1221.40

    Help with any (or both) of the issues above would be greatly appreciated!


    Thanks,
    Katie

  2. Missing user
    Missing user avatar

    Posted 30 Mar 2011 Link to this post

    Hi Katie Arnott,

     Indeed we must admit that the Item.ActiveRegion.Click event does not work as expected, therefore it is not possible to disable the Chart Title and Chart Legend to not be clickable. I forwarded this issue to our developers for further review.

    Your telerik points have been updated.

    Greetings,
    Polina
    the Telerik team
  3. Katie Arnott
    Katie Arnott avatar
    25 posts
    Member since:
    Dec 2009

    Posted 30 Mar 2011 Link to this post

    I have found a workaround in the code behind by using javascript:

    xx.Chart.ChartTitle.ActiveRegion.Attributes = "onmouseover=\"this.style.cursor = 'default';\" onmouseout=\"this.style.cursor = 'default';\" onclick=\"return false;\"";
    xx.Legend.ActiveRegion.Attributes = "onmouseover=\"this.style.cursor = 'default';\" onmouseout=\"this.style.cursor = 'default';\" onclick=\"return false;\"";
     
    you also have to do the same for the legend items and there markers
     
    legendItem.ActiveRegion.Attributes = "onmouseover=\"this.style.cursor = 'default';\" onmouseout=\"this.style.cursor = 'default';\" onclick=\"return false;\"";
    legendItem.Marker.ActiveRegion.Attributes = "onmouseover=\"this.style.cursor = 'default';\" onmouseout=\"this.style.cursor = 'default';\" onclick=\"return false;\"";


Back to Top