imaNNeo / imaNNeo/fl_chart

Animation isn't smooth when the data points are different

Open
#985 6 comments 1 reaction 0 assignees View on GitHub
enhancement Scatter Chart
Dominant language
Dart
Stars
7.6k
Forks
2k
Avg merge
9d 1h
Merged PRs (30d)
2

Description

**Describe the bug**
The expected behaviour is to have a smooth animation when the chart gets updated like below. In this case, the minX, maxX, minY, maxY are same in chart 0 and chart 2
![expected](https://user-images.githubusercontent.com/95603936/166117317-5a654767-3a7d-48b0-8347-99ef5900d680.gif)

However, I sometimes do not find animation and it suddenly jumps to the location. Here, the maxX, maxY are different in chart 0 and chart 3.
![actual](https://user-images.githubusercontent.com/95603936/166117441-48a2a50d-4025-4eb4-abe9-f776677a86f8.gif)

**To Reproduce**
The modification is in `scatter_chart_sample2.dart` file ans can be found [here](https://gist.github.com/prajwal27wiijii/0a5c7e1332daa81ad64fc60208992ee5).

**Versions**
- which version of the Flutter are you using? -- 2.10.1
- which version of the FlChart are you using? -- 0.50.1

Contributor guide

Open the contributing guide

Research direction

Start with the modified scatter_chart_sample2.dart file from the linked reproduction and compare the updates shown in chart 0, chart 2, and chart 3. Investigate why changing maxX or maxY causes the scatter chart to jump instead of animate. Done means the reproduced data-point updates animate smoothly even when the chart bounds differ.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.