Flutter Docs
  • Flutter Docs
  • Charts
    • Chart It
    • Guides
      • Cartesian Charts
        • Chart Structuring
          • Grid Styling
          • Axes Styling
          • Axis Labels
        • Charts
          • Bar Chart
            • BarSeries
            • Bar Groups
              • SimpleBar
              • MultiBar
            • Styling
            • Bar Interactions
              • Snap to Bar
              • Fuzziness
      • Radial Charts
        • Charts
          • Pie & Donut Chart
            • PieSeries
            • SliceData
            • Styling
            • Interactions
      • Animations
      • Interactions
    • API Documentation
Powered by GitBook
On this page
  1. Charts
  2. Guides

Animations

Implicit Animations for Charts.

PreviousInteractionsNextInteractions

Last updated 2 years ago

All Animations in the chart widgets are Implicitly Animated. The default animation behaviour for all chart widgets is:

  1. animates when the widget loads for the first time.

  2. animates for every new data updates.

You can override the default behaviour using the animateOnLoad and animateOnUpdate properties at top level widget.

...
import 'package:chart_it/chart_it.dart';
	
...
child: BarChart(
  animateOnLoad: false,
  animateOnUpdate: true,
  animationDuration: const Duration(milliseconds: 750),
  data: BarSeries(
  ...
...
import 'package:chart_it/chart_it.dart';
	
...
child: BarChart(
  animation: AnimationController(
    duration: Duration(milliseconds: 500),
    vsync: this, 
  ),
  data: BarSeries(
  ...

All animations in the widget are handled internally. However, if you wish to control your own animation, then you can provide your own custom to the top level property animation.

AnimationController