How do you set percentage in Google Visualization Chart API?

前端 未结 3 716
挽巷
挽巷 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:20

    chart.draw(data, {vAxis: {format:'#%'} } );
    

    To get comma for thousands, use {format:'#,###%'}.

    See http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html

提交回复
热议问题