Hi Daniel,
Thanks for using our Flutter Chart widget. We have analyzed your scenario and we would like to let you know that, by default, if there are any changes in data sources, then the changed data point will get animated on refreshing the changes. This is our default behaviour. If you wish not to animate the series when there is any change, you can specify the animationDuration to 0 with the onRefresh method of refresh indicator. So that the chart widget will animate on the initial rendering and on pull down with refresh indicator, the animation will not happen. Find the code below to achieve this.
double chartAnimationDuration = 1500;
Future<void> refresh() {
chartAnimationDuration = 0;
//Other configurations
return Future.value();
}
SfCartesianChart(
series: <LineSeries<ChartSampleData, num>>[
LineSeries<ChartSampleData, num>(
dataSource: chartData,
animationDuration: chartAnimationDuration,
),
],
)
|
And we would like to let you know that, while using the onRefresh function in RefreshIndicator, this will call the didChangeDependencies and build methods of the respective widgets, so the changes got reflected back. We have also attached a sample for your reference, which can be found below.
Sample:
Thanks,