Skip to content

[BUG] Sometimes the axes lose their sharpness #4640

@rmaksim

Description

@rmaksim

Expected Behavior

good

Current Behavior (Sometimes)

bad

Possible Solution

This is because - we get a fractional value in the variable totalLeftBoxesWidth
also all totals - total ( Left | Right | Top | Bottom ) BoxesWidth
https://github.com/chartjs/Chart.js/blob/master/src/core/core.layoutService.js#L405

For example to use Math.ceil() to get the smallest integer greater than or equal to a given number.
and then there will always be an excellent result ;)

And maybe this will solve another issue #4637

Steps to Reproduce (for bugs)

for example on sample page press btn Randomize Data many times
http://www.chartjs.org/samples/latest/charts/line/basic.html

  • Chart.js version: any version
  • Browser name and version: any browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions