Formatting legend and axis in Google Charts

后端 未结 3 1213
小鲜肉
小鲜肉 2021-02-08 11:29

I\'m new with Google Charts and I am not able to obtain a fine result with the texts surrounding the graph.

This is how my chart looks:

3条回答
  •  一个人的身影
    2021-02-08 11:57

    For optmized chart area,

    chartArea: {'width': '90%', 'height': '60%'}, 
    legend: { position: 'bottom' },
    hAxis : { textStyle : { fontSize: 10} },
    vAxis : { textStyle : { fontSize: 10} },
    

    The trick is setting axis textStyle fontsize will enable better placement of legend on the bottom of the chart as the chart Area is about 60-70%

    Feel free to use my custom Google Charts plugin which creates both chart and table. https://github.com/cosmoarunn/gapiExt

提交回复
热议问题