您如何在 Google Visualization Chart API 中设置百分比? [英] How do you set percentage in Google Visualization Chart API?

查看:33
本文介绍了您如何在 Google Visualization Chart API 中设置百分比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置纵轴以显示百分比,例如 25%、50%、75%、100%?

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

推荐答案

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

要获取千位逗号,请使用 {format:'#,###%'}.

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

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

这篇关于您如何在 Google Visualization Chart API 中设置百分比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆