Xuni Product Documentation - Xamarin.Forms
Animation

You can choose to enhance the user experience of FlexChart by enabling and configuring animation effects to the plot elements upon load and update. By default, animation is enabled. You can disable animation by setting is the IsAnimated property.

In Code

C#
Copy Code
// disable animation
chart.IsAnimated = false;

You can configure the animation start delay and duration in milliseconds.

In Code

C#
Copy Code
// set load animation start delay to 1 millisecond
chart.LoadAnimation.StartDelay = 1000;
// set update animation duration to 2 millisconds
chart.UpdateAnimation.Duration = 2000;

The update animation occurs when the underlying data collection changes by adding a value, removing a value or modifying a value. To support update animation you should use either an ObservableCollection or a XuniCollectionView as your data source. Regardless of the data source, the update animation also occurs when a series' visibility changes, such as when LegendToggle is set to True.

The load animation occurs when the chart initially loads. You can change the fundamental loading animation effect by setting the AnimationMode property. FlexChart supports three different animation modes: All, Series or Point (default).

In Code

C#
Copy Code
// set the loading animation mode to series
chart.LoadAnimation.AnimationMode = ChartAnimationModes.Series;

You can configure the animation further by setting the easing function that is applied to the animation. FlexChart supports a collection of standard easing functions such as cubic in/out, spring in/out, bounce in/out and linear. The default animation easing is CubicIn.

In Code

C#
Copy Code
// set the loading animation easing
chart.LoadAnimation.Easing = ChartEasing.CubicOut;

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback