google visualization chart, size in percentage

后端 未结 5 1649
我在风中等你
我在风中等你 2021-01-07 19:29

How do you set the size of a google chart in percentage : I have this in the html:

5条回答
  •  情歌与酒
    2021-01-07 19:58

    Google recommend that you style, like the answer above, with correct CSS and this makes a less-glitchy Chart. However, you can size it up in Javascript...
    https://developers.google.com/chart/interactive/docs/basic_customizing_chart
    So, for the options when you draw the chart (using chart.draw(data, options) as above)...

    var options = {
        width:400,
        height:300
    }
    

    A good fiddle for a responsive design is here...
    http://jsfiddle.net/toddlevy/pyAz5/

提交回复
热议问题