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 chart line thickness when zero #6552
Comments
What version are you using? |
2.7.2 |
This was fixed in #5321 (2 years ago) and included in 2.7.3 |
Still having this issue in the latest version when hiding the x-y axis and legend (bottom and top line are cut off). See the following example: Any fix for this? |
@mbont your fiddle uses Chart.js 2.3.0. |
@kurkle Updated fiddle with latest Chart.js 2.9.1 version (not available on cdnjs yet) |
@mbont ok, in that case the canvas edge is limiting the drawing. You need to add some padding to allow chartArea overflow: options: {
layout: {
padding: 1
}
} |
@kurkle Thanks, that works! |
@kurkle Please see this https://jsfiddle.net/nishantprajapati/7hn2vcju/1/ I am able to re-produce this issue in latest release 2.9.3. Can you help us out with a solution ? Or Let us know if it will be a part of next release. The image attached is a real use case where 2 different chart use the same chart JS (2.9.3 version) Thank you, |
@nishantprajapti in that fiddle, the canvas edge is limiting, so padding fixes it. It does not seem like that is the case with your real use case though. |
Thank you so much for the help @kurkle . It work for me but curious to know something. When i set the value to false. It work but when i gave it properties like clip: {left:2,top:0} and so on I did not notice any change. How does it property actually work ? |
It looks like there is a bug, you have to define all edges for it to work: https://jsfiddle.net/zchb3L4w/ |
@kurkle in that what should we keep the default values for {top, left ,bottom,right} so that no new bug is encoutered and also the above issue mentioned by me is also solved. |
@nishantprajapti I can't answer that based on the information provided. Anyway, lets stop wasting time: if its not working how its documented, please file a new bug with a fiddle. |
Somewhat picky but on a line chart a line that reaches zero should be the same thickness the entire way across the chart regardless of the value. The line once it reaches the bottom/zero looks somewhat hidden or cut off until it goes above zero. See below:
The text was updated successfully, but these errors were encountered: