Expected Behavior
When the canvas container has style="display: none;" then later on set to block using JS, used with the chart option maintainAspectRatio: false, the chart should be the same size as without the complications with display: none.
Current Behavior
When the canvas container has style="display: none;" then later on set to block using JS, used with the chart option maintainAspectRatio: false, the height of the chart is squished to around 20px or in some cases 0px.
Steps to Reproduce (for bugs)
fiddle
- Press "Toggle Display"
- You should see that the chart is squished (very low height).
- Remove the
style="display: none; and re-run the fiddle.
- You should see that the chart is the correct size.
I expect both to have the same size.
Environment
- Chart.js version: 2.6.0
- Browser name and version: Firefox 54.0.1