-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Line cut off when yAxes display set to false #7194
Comments
This may have been fixed in 3.0 if you'd like to try out 3.0.0-alpha: |
@benmccann Thanks for the update but i'm not ready for alpha as it has some breaking changes. I fixed above issue by changing the min and max and tried to add padding using floor/round it worked for now :) |
I'm not sure why you are specifying the min, max and beginAtZero. Probably has to do with your real use case rather than this example. Another workaround is to use layout padding: https://jsfiddle.net/shm2ovtq/ |
@kurkle Please don't mind
Thanks for your workaround. 👍 |
@kurkle @benmccann Also just checked on v2.9.3 its happening here too : https://jsfiddle.net/qz7be69u/2/ |
I was originally thinking this might be a duplicate of #6631, but it looks like that one was maybe fixed in both 2.9.3 and 3.0, so perhaps this is a different issue. It'd be good to test against 3.0 to see if there's anything left to fix here |
@benmccann I think its something to do with min/max rounding function in ChartJs. If i have that i can round my data point and it might work properly. |
@ashbuilds the center of the line is at the value. So half of it is going to be out of chart area when max is se to that value. Another thing is |
Closing per the above discussion; using padding is the best way to achieve this at the moment |
Hi, Setting display yAxes to false cutting of the line from top please check fiddle below:
https://jsfiddle.net/2f9768gp/ - v2.4
https://jsfiddle.net/bd052hz8/4/ - v2.9.3 (happing on both display false or true)
In the above fiddle please change display to false and the line will be overflow from canvas.
Expected Behavior
Line should not cross yAxes when display is false
Current Behavior
Line is cutting off from top
"chart.js": "2.9.3"
The text was updated successfully, but these errors were encountered: