-
Notifications
You must be signed in to change notification settings - Fork 846
Animation behaviour when updating Cartesian chart #2351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @shaddeen, We would like to explain the current animation behavior in our chart. Currently, only a single data point is supported for animation in line-type and continuous-type series. Even when multiple data points are added, only the last newly added data point animates. The rest of the newly added data points (except the last one) are rendered instantly without smooth transitions, causing the update to appear abrupt and jarring. This was done on purpose to avoid performance issues during frequent or large updates. UG Link: Series customization in Flutter Cartesian Charts widget | Syncfusion To achieve smooth animation for all newly added data points, we recommend using a timer-based approach as a workaround. By introducing a delay and adding data points one at a time, you can allow each point to animate sequentially. Make sure the timer duration is set longer than the chart’s animationDuration to ensure that each animation completes before the next point is added. If the delay is too short, the animation overlap may still result in abrupt transitions. Code Snippet:
Output: sample: gh2351.zip At present, we don’t have built-in support to animate all newly added points simultaneously. However, we have logged this requirement as a feature improvement in our feedback portal. We prioritize features for upcoming releases based on overall demand and impact. This enhancement will be considered for implementation in a future release. You can also track the status of the feature with the feedback below. FR Link: Enhance Animation for Dynamically Added Data Points in SfCartesianChart in Flutter | Feedback Portal Regards, |
Thanks for the workaround! |
Please reopen this ticket, if you need further assistance with this. |
Bug description
I've implemented a line/area chart with a time range selector that updates the data source accordingly. I've noticed an undesirable animation effect when the number of data points increases; the transition between the old and new states appears jarring.
When the number of data points remains the same or decreases, the update is handled smoothly.
Is there a configuration option to control this behaviour, or is this a known issue?
flutter: 3.29.0
syncfusion_flutter_charts: 29.1.41
Platform: iOS 18.3 (Simulator)
Steps to reproduce
SfCartesianChart
with aLineSeries
.Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2025-05-13.at.13.59.53.mov
Stack Traces
Stack Traces
N/A
On which target platforms have you observed this bug?
iOS
Flutter Doctor output
Doctor output
N/A
The text was updated successfully, but these errors were encountered: