Responsive Highcharts not sizing correctly until window resize

前端 未结 12 1410
北荒
北荒 2021-01-30 16:06

I\'m using Highcharts within Zurb\'s Foundation framework for a class project. I have three charts within a section tab. One is within a 12-column div, the other two are on the

12条回答
  •  醉梦人生
    2021-01-30 16:39

    You can use this code for the example

    var chart;
    $(function() {
      var newh = $("#container").height();
        $( window ).resize(function() {
        newh = $("#container").height();
        chart.redraw();
        chart.reflow();
      });
      chart = new Highcharts.Chart();
    })
    

    http://jsfiddle.net/Behseini/qheh4w0n/

提交回复
热议问题