Resize chart height on parent div resize
See original GitHub issueWhen resizing the div where the chart is created, the chart automatically resizes horizontally, but not vertically because of this line:
Line 880
$$.selectChart.style('max-height', $$.currentHeight + "px");
Please consider changing this in order to support full resize
Issue Analytics
- State:
- Created 8 years ago
- Comments:9
Top Results From Across the Web
Resize a chart on parent div resize - Stack Overflow
1 Answer 1 ... You can set the dimensions of the chart on resize event of window. $(window).resize(function() { resetDimensions(); });.
Read more >Resize chart according to div height and width - Highcharts
Hi, How to resize the chart to fit into the div height and width. If I reduce the height and width of the...
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 >D3.js tutorial - Part 9 - Resize chart - Lulu's blog
To adapt our chart to the parent division, we need to know its size. The parent size can be retreived with the style()...
Read more >Resize Canvas when parent-div got resized | CanvasJS Charts
In the latest version you can just call render method whenever its container's size changes and the chart readjusts its size (only if...
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 FreeTop 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
Top GitHub Comments
I’m still seeing this problem in 0.7.15
Indeed. The chart can shrink, but once it’s shrunk it won’t expand again (because of max-height). http://i.imgur.com/hbvDUkX.gifv
Once the chart has shrunk it doesn’t work to call resize() or flush() either. Workaround: