Skip to content

Charting small integers results in weird scale in v2.0 #1561

@SteveVanHorn

Description

@SteveVanHorn

Creating a chart with only small integers results in a really weird scale.

This code in scale.linear.js is ending up with precision problems.

// Put the values into the ticks array
for (var j = niceMin; j <= niceMax; j += spacing) {
    this.ticks.push(j);
}

Here is an example jsfiddle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions