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

reopening #4063 New smooth curve causes time to warp for sparse data #4108

Closed
DamienGdn opened this issue Nov 16, 2023 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@DamienGdn
Copy link

I am reopening post #4063 regarding the bug 'New smooth curve causes time to warp for sparse data,' which is still not fixed in ApexChart v3.44.0.

Description

The latest release (3.43.0) changed the "smooth" curve. This is an improvement and looks great for evenly spaced data, but when data is sparse and moves around a lot, it can cause the chart to temporarily flow backwards in time, or completely reverse and do a loop.

Steps to Reproduce

Make a line or area chart with sparse erratic data (for example, [{ x: 0, y: 11 }, { x: 1, y: 10 }, { x: 2, y: 18 }, { x: 13, y: 5 }, { x: 20, y: 100 }])
Set stroke.curve to 'smooth'
Enjoy the show
Expected Behavior
Line and area chart lines move relatively smoothly from one point to the next, but never going backwards in time.

Actual Behavior

Line and area chart lines can go backwards in time.

Screenshots


Reproduction Link
https://codepen.io/Tankenstein/pen/ZEVZXeq

I have the same issue on my side, as you can see.
MicrosoftTeams-image

@azivkovi
Copy link

This is still an issue: https://codepen.io/azivkovi/pen/ZEwqOxG

@meixger
Copy link

meixger commented Jan 1, 2024

Similar problem with null values and smooth: https://codepen.io/meixger/pen/XWGmaEJ

@mtuzenko
Copy link

Same issue here
image
image

@junedchhipa
Copy link
Contributor

The previous smooth logic is re-added since v3.45.2

So, from now on, you have 4 curve options for stroke

stroke: {
  curve: "smooth" // straight, smooth, monotoneCubic, stepline
}

Use either smooth or monotoneCubic to see whatever works for you.

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

5 participants