Highcharts - issue about full chart width

后端 未结 2 1484
野性不改
野性不改 2020-11-29 05:17

I\'m using Highcharts column chart and I want it to be 100% width responsive chart. The container is a simple

with no any formatting. When the docum
2条回答
  •  执念已碎
    2020-11-29 05:38

    I know this is an old question, but I ran into the exact same issue and found another solution that works great.

    As of Highcharts 4.1.5 (could be in older versions as well), the chart object has a reflow() function. View the documentation here.

    reflow ()

    Reflows the chart to its container. By default, the chart reflows automatically to its container following a window.resize event, as per the chart.reflow option. However, there are no reliable events for div resize, so if the container is resized without a window resize event, this must be called explicitly.

    Hope it helps someone else.

提交回复
热议问题