How do you set percentage in Google Visualization Chart API?

前端 未结 3 586
挽巷
挽巷 2021-02-18 19:47

How do you set the vertical axis to display percent such as 25%, 50%, 75%, 100%?

3条回答
  •  太阳男子
    2021-02-18 20:35

    var options = {
            title: 'Chart Title',
            vAxis: {
                minValue: 0,
                maxValue: 100,
                format: '#\'%\''
            } 
        };
    

    Try escaping the % sign. I've used this to just append the % sign in the y axis.

提交回复
热议问题