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

Disable animation when zooming

1 Answer 79 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 11 Dec 2012, 03:26 PM
Hello, 

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

Thanks. 

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 14 Dec 2012, 12:26 PM
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.

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