Responsive Highcharts not sizing correctly until window resize

前端 未结 12 1676
北荒
北荒 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:44

    You can add an event listener so your chart resizes every time it redraws:

    mychart = new Highcharts.stockChart('div',   {
        chart: {
            events: {
                redraw: function(e) {
                    mychart.reflow();
                }
            }
        },
    

提交回复
热议问题