Disable animation when zooming

2 posts, 0 answers
  1. Mike
    Mike avatar
    75 posts
    Member since:
    Nov 2011

    Posted 11 Dec 2012 Link to this post

    Hello, 

    I'm looking for a way to disable chart annimation just when I zoom on the chart. 

    Thanks. 
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 14 Dec 2012 Link to this post

    Hello Radouan,

    The RadChartView (RadCartesianChart) does not support animations. I believe that you are using RadChart instead.

    If that is the case you can use the EnableAnimations property of the ChartArea, to disable the animations. 

    If you want animations to appear initially when the chart is loaded and then disable them when the user starts zooming / scrooling you can use the PropertyChanged event of the ZoomScrollSettingsX. Here is an example: 
    //Attach to the event:
    this.RadChart1.DefaultView.ChartArea.ZoomScrollSettingsX.PropertyChanged +=
         ZoomScrollSettingsX_PropertyChanged;
     
     
    void ZoomScrollSettingsX_PropertyChanged(object sender,
    PropertyChangedEventArgs e)
    {
        //check if the user is zooming/scrolling
        if (e.PropertyName == "ShouldRebind")
        {
            this.RadChart1.DefaultView.ChartArea.EnableAnimations = false;
        }
    }

    I hope this helps.

    Kind regards,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top