Skip to content

Data points incorrectly scaled on xaxis when stepSize specified #4982

Open
@woodruffian

Description

@woodruffian

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

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