Skip to content

[BUG] Linear Axis stepSize leads to unexpected behaviour when decimal and greater than 1 #5579

@V-Mario

Description

@V-Mario

Current Behavior

Linear Axis stepSize leads to unexpected behaviour when its value is decimal and greater than 1
Here's an example: https://codepen.io/V-mario/pen/qKoWRE

Expected Behavior

Grid lines should be equally spaced thus values shown under x axes should be [0, 1.3, 2.6, 3.9, 5.2, 6.5, 7.8, 9.1, 10.4, 11.7, 13] as max is 13, min 0 and stepSize 1.3

Here's a working example having stepSize 0.9 instead: https://codepen.io/V-mario/pen/LrdPyp

Environment

  • Chart.js version: 2.72
  • Browser name and version: Chrome 67.0.3396.87

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions