Skip to content
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

3.49 causes issues with animation #4463

Open
VeloAddict opened this issue May 11, 2024 · 4 comments
Open

3.49 causes issues with animation #4463

VeloAddict opened this issue May 11, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@VeloAddict
Copy link

Here is an example:

https://codepen.io/velobarplus/pen/NWVWRNB

@VeloAddict VeloAddict added the bug Something isn't working label May 11, 2024
@rosco54
Copy link
Contributor

rosco54 commented May 15, 2024

Looking at this.

@rosco54
Copy link
Contributor

rosco54 commented May 23, 2024

Why you're seeing this:

If you look closely when running these examples under earlier versions you can see that the same effect occurs but only between the new datapoint and the preceding datapoint. The same problem is there but on a smaller scale.

In order to fix several gradient fill issues that produced permanently visible discontinuities in both area and line fills, it was necessary to compute a single enclosing path for each contiguous segment of a series, rather than multiple paths that butt together (one for at each datapoint in the series). The underlying SVG requires this in order to work correctly. For complete series with no missing data this results in a single enclosing path that includes all datapoints, hence you see the whole chart being reanimated, not just the last datapoint.

One conventional approach to fix this (in code) IMO would be:

  1. the fill animation to be disabled after the initial rendering,
  2. the chart to be redrawn after the new datapoint is appended but in a window that is one datapoint wider than the visible grid ( the new data is initially off the grid),
  3. the chart is then scrolled right to left to bring the new datapoint into view,
  4. the oldest datapoint to then be dropped,
  5. repeat from (2).

@jherman
Copy link

jherman commented May 24, 2024

Just an FYI for others that reach this. If you are in need of a quick fix, reverting back to v3.48.0 works.

See codepen here:
https://codepen.io/jh_codepen/pen/dyEppwg

@rosco54
Copy link
Contributor

rosco54 commented May 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants