Formatting legend and axis in Google Charts

后端 未结 3 1179
小鲜肉
小鲜肉 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 12:05

    After some time experimenting, I daresay it is not posible to choose how much part of the words on legend or axis you can show.

    However, you can play with their sizes and position so you get -more or less- what we were looking for. This is what can be done:

    legend: {position: 'top', textStyle: {fontSize: 14}}
    

    I've also made the image a little bit bigger so it fits the x-axis without problems (There was also the option of making its text smaller).

    So doing this, this is what you get: enter image description here

提交回复
热议问题