score:1
I ran into the same problem and used the following solution to size my chart:
$('#chart-carousel').bind('slid', function() {
$("#value-stats").highcharts().setSize(500, 350);
});
By binding the slid
event - which signals a completed slide of the carousel - to the setSize()
method of the chart, the chart gets resized properly.
Two points:
There's is a visual effect as you see the chart actually change size when the slide is completed.
I tried to work it out with dynamic sizing using
container.height
andcontainer.width
but this had no effect at all hence the hard coded sizes. Not ideal but at least my charts get properly sized.
score:1
I know that it's an old question, but I stumbled upon the same problem and found a solution using Highcharts reflow function.
If all charts have the class container-main
, you can do something like this:
$('.carousel').carousel().on('slide.bs.carousel', function (e) {
setTimeout(function(){
$('.container-main').each(function(){
$(this).highcharts().reflow();
});
}, 1);
});
Hope this will help somebody.
Source: stackoverflow.com
Related Query
- Highcharts content in bootstrap carousel is not auto-resizing to carousel
- How to export the whole page or html content with Highcharts not just the chart?
- highcharts graphs in bootstrap tabs are not displaying properly
- Highcharts item width not 100% in carousel
- Highcharts free-form drawing content not getting exported
- jspdf is not able to capture the div content properly for highcharts to download as pdf format
- Highcharts xAxis labels do not auto rotate
- Highcharts view Fullscreen not resizing after print
- Decimals on yAxis are not being displayed, even if that same code works on highcharts jsfiddle
- Highcharts and OpenLayers not rescaling after Bootstrap layout change
- Highcharts in JQuery Tabs - Resizing hidden tab code stops resizing visible tab
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- Bootstrap - Highcharts not showing
- Set Bootstrap Panel Size 100% + Highcharts content
- Dynamically create highcharts with bootstrap carousel
- Chart not resizing according to it's container Highcharts reactjs
- Highcharts graph not filling Bootstrap box
- Highcharts svg element "highcharts-series-group" not resizing
- Dynamically changing Highcharts Theme through Jquery code not working
- Highcharts code with same set of code/data works in PHP but does not work in JSfiddle
- The graph is not equal on the basis of the addition code in Highcharts
- Responsive Highcharts not sizing correctly until window resize
- Highcharts :Uncaught TypeError: $(...).highcharts is not a function
- How do I rotate my HighCharts bar chart so its vertical, not horizontal?
- Highcharts won't fit in Bootstrap 3 modal body
- Highcharts yAxis max not working
- Highcharts area fillOpacity do not work when changing the color
- Highcharts Error #16: charts not showing on the same page
- Highcharts does not resize charts inside tabs
- Highcharts saying undefined is not a function when trying to add a new chart
More Query from same tag
- Download Highchart Graph on different button click
- Highcharts large treemap How do I get the clicked node data?
- Setting color on label gridline Highcharts
- Adding Default values to x Axis
- highCharts flags - drop line from flag on series
- Highchart - Custom Images for Labels by using html
- Json data in High chart
- Issues with series.data in highcharts
- Add conditional color to Treemap
- Highcharts shankey diagram percentage not showing
- Datetime format for series - Highcharts
- Update tickposition on zoom
- Highcharts Areaspline - Highlight a column on hover effect
- Javascript variable not working inside of highcharts
- Highcharts multiple series drilldown to multiple series
- Sockets getting emitted , however data is not getting displayed in High charts Spline
- How can I highlight USA using Highcharts without highlighting Alaska?
- Highstock doesn't work
- Highstock make navigator handles move a fixed distance relative to eachother
- HighCharts box-plot: how to make it horizontal
- Array loop to determine a range average
- In a multiple column layout my highchart is not visible in Safari
- How to create PIE chart with slice inside outer circle
- Can we have multiple callout in timeline chart for single point?
- HighCharts JS - Getting multiple linear underlays on a scatter plot
- Date.parse() not working with highchart
- Highcharts not workng with angular 4
- highcharts x-axis for 1 year displays tick/label of year +1
- Highcharts - Continuous line with centered step (start before the first point)
- Show Series and colorAxis both in Legend