How the legends on Google charts can be wrapped

前端 未结 3 1800
小蘑菇
小蘑菇 2021-02-14 11:57

I need the legends of Google chart to get wrapped (comes in new line) automatically if it exceeds container area. I don\'t want scroll button as it is not enough convenient. Wi

3条回答
  •  醉梦人生
    2021-02-14 12:41

    with the maxLines property for the legends, chartArea with specific set of values can help in rendering the display.

    legend: { position: "top", alignment: "start", maxLines: 2 },
    chartArea: {top:50,bottom:30,right:0,left:50, 'width': '100%' }
    

提交回复
热议问题