Skip to content

Line chart initial animation slides points to the right, resulting in an odd appearance #4994

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

Open
jgough opened this issue Mar 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jgough
Copy link

jgough commented Mar 25, 2025

Description

When line charts are rendered, the entrance animation of each point starts at the wrong location on the x axis. They start from the x position of the previous point. This means points move up-and-right instead of vertically upwards which results in a very odd looking transition. Seems like an off-by-one error when calculating the start position?

Steps to Reproduce

  1. Create a simple line chart
  2. Observe the line chart entrance animation
  3. Note that points are sliding up and to the right instead of sliding veritcally upwards as I would expect
    Note that this is easier to see with a slower entrance animation, for example using speed: 10000

Expected Behavior

Points should follow the animation as indicated in the orange lines, moving vertically into position
Image

Actual Behavior

Points follow this animation, starting at the x position of the point to the left and moving up and right into position instead of vertically upwards. This results in a weird sliding behaviour that distorts the line and looks odd
Image
Blue line is the final position, faint blue line is an intermediate position

Reproduction Link

https://apexcharts.com/javascript-chart-demos/line-charts/basic/
or
https://codepen.io/jongoo99/pen/YPzjNgQ
(possibly clearer)

@jgough jgough added the bug Something isn't working label Mar 25, 2025
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

1 participant