Skip to content

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

Open
@jgough

Description

@jgough

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions