How to set plot area width and height in Highcharts?

前端 未结 3 1464
隐瞒了意图╮
隐瞒了意图╮ 2020-12-19 21:44

I\'m plotting a map made by a series of points in HighCharts. I want that map to be properly scaled and be a perfect square.

Thus, i\'ve set the chart height and wid

3条回答
  •  借酒劲吻你
    2020-12-19 22:15

    You can extend Highcharts with new function. Here you can find information about extending Highcharts: http://www.highcharts.com/docs/extending-highcharts/extending-highcharts

    As you will see in my demo, I wrapped setChartSize function and give them possibility to use parameters from your chart options:

    chart: {
      plotAreaWidth: 300,
      plotAreaHeight: 200
    },
    

    Function is also positioning your plot area in the middle of chart container.

    example: http://jsfiddle.net/izothep/eph5secj/2/

提交回复
热议问题