Resize height with Highcharts

前端 未结 4 1588
清歌不尽
清歌不尽 2020-12-08 10:53

I have a Highchart which resizes the width beatuifully when the window change size. But not the height. I tried this set chart size but it\'s not working proberly. Is there

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 11:27

    According to the API Reference:

    By default the height is calculated from the offset height of the containing element. Defaults to null.

    So, you can control it's height according to the parent div using redraw event, which is called when it changes it's size.

    References

    • http://api.highcharts.com/highstock#chart.height
    • http://api.highcharts.com/highstock#chart.events.redraw

提交回复
热议问题