Skip to content
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

[BUG] Sometimes the axes lose their sharpness #4640

Closed
rmaksim opened this issue Aug 9, 2017 · 1 comment · Fixed by #5880
Closed

[BUG] Sometimes the axes lose their sharpness #4640

rmaksim opened this issue Aug 9, 2017 · 1 comment · Fixed by #5880

Comments

@rmaksim
Copy link

rmaksim commented Aug 9, 2017

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
@rmaksim rmaksim changed the title [BUG] Sometimes the guides lose their sharpness [BUG] Sometimes the axes lose their sharpness Aug 9, 2017
@rmaksim
Copy link
Author

rmaksim commented Oct 25, 2017

Steps to Reproduce

with 2.7.0 http://jsbin.com/vifidij/edit?html,css,js,output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants