How do you set percentage in Google Visualization Chart API?

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

    Using bar charts, I found my results haphazard and I got to consistency by doing the following: 1. In your data column, set a value of 100, even if you add a dummy value of 100. 2. Select all the numeric cells in the column and format them using Format, Number, Normal 3. Now format them to % using Format, Number, Percent Rounded

    Your graph should now show 100% on the vertical scale and if you have a dummy value for 100% you will want to hide it, so you can either format it by clicking on it in the graph and changing the color (but this doesn't seem to work every time) or go to Advanced Edit, Customize, Columns, select your column name (from the graphic legend) and set the bar color to None or whatever your background color is.

    Good luck.

提交回复
热议问题