Skip to content

Data points incorrectly scaled on xaxis when stepSize specified #4982

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
woodruffian opened this issue Mar 11, 2025 · 0 comments
Open

Data points incorrectly scaled on xaxis when stepSize specified #4982

woodruffian opened this issue Mar 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@woodruffian
Copy link

woodruffian commented Mar 11, 2025

Description

Steps to Reproduce

YOu can reproduce at this code pen https://codepen.io/urbnsurfr/pen/PwoJmpL

  1. create a scatter chart
  2. populate with x-y data points
  3. specify a stepSize on x axis that differs from what apexCharts would have chosen automatically

Expected Behavior

Consider this data set:
{ x: 1, y: 5 },
{ x: 2, y: 10 }
{ x: 5, y: 15 },
{ x: 6, y: 15 }

Image

Actual Behavior

Add a xaxis.stepsize and you will get the incorrect result
Setting xaxis.type="numeric" does not resolve it, it does change the x axis scale.

xaxis: {
// to cause the problem, add a step size
// any deviation from default stepSize causes issue.
// you will see that the points are plotted
// in the wrong location along the x axis.
stepSize: 2
},
Image

Screenshots

Screen shots shown in expected and actual behavior. Note the difference in the x axis. The x axis labels updated, but the positions of the data were not updated.

Reproduction Link

code pen copied and adjusted as https://codepen.io/urbnsurfr/pen/PwoJmpL

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