chart is out of the canvas
See original GitHub issueWhen hide both xAxes and yAxes together
xAxes: [{ display: false }],
yAxes: [{ display: false }]
the chart is out of the canvas. jsfiddle
I tried to adding padding using CSS, but it does not work.
You can check it by Chrome’s Developer Tools:
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Google Chart Bar chart is rendered outside of the chart canvas
When there is a high value like one million, the bar chart is not rendered. If you inspect the element is with a...
Read more >Responsive Charts - Chart.js
Chart.js provides a few options to enable responsiveness and control the resize behavior of charts by detecting when the canvas display size ...
Read more >Amazon.com: Animals Growth Chart for Kids, Baby Height ...
Amazon.com: Animals Growth Chart for Kids, Baby Height Chart, Canvas Height Measuring ... ASIN: B08JYSJHPY; Customer Reviews: 4.6 out of 5 stars 565Reviews....
Read more >Heart of the Adirondacks Canvas Wall Chart
Shop this Heart of the Adirondacks Canvas Wall Chart reproduction of an 1800s Verplank Colvin Adirondack survey and ... This item is currently...
Read more >Canvas Growth Chart - Etsy
Check out our canvas growth chart selection for the very best in unique or custom, handmade pieces from our wall decor shops.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello all.
I’ve been investigated how to make a hotfix to solve that. I saw three strange behaviors:
1- The data breaks if have heavy changes, for example:
2- The ‘error’ is always the half of the height of our borderWidth.
3- That error may was introduced when we changed the line 36 of core.layoutService.js on the next COMMIT
In second place I saw two strange padding vars inside the function ‘update’ of the core.layoutService:
Around the line 29 we have the function and on lines 35 and 36 we have the strange vars.
I have been seen what the function does with that vars, specially with yPadding. I couldn’t se any useful calc done with yPadding. In my opinion here is the problem. We always maintain the yPadding to 0 and IMHO it was an error applied in another version of that file HERE .
The solution is that follows and I developed that because is the demand behind the developer of that commit deleted the line.
THAT’S A HOTFIX, I WILL MAKE A PR AND IF IT IS APPROVED IT WILL BE THE SOLUTION
If you apply that code you will can set your padding on the styles config of the chart, also, if you don’t apply any config he will take a default based on the chart height.
Config prop example:
Once we have loaded the ChartJS lib, overwrite the method doing the next:
Fixed in #3476