任何人都可以帮助获得百分比symbol[%]
在 Y 轴值中。
我附上了png。在那y axis 0 t0 18
值在那里,我想将其视为 0% 到 18%。
http://i.stack.imgur.com/pF6U0.png
最佳答案
您需要在两个地方格式化:数据和轴。要格式化数据,请使用 NumberFormatter:
var formatter = new google.visualization.NumberFormat({pattern: '#%'});
// format column 1 of the DataTable
formatter.format(data, 1);
通过
vAxis.format
格式化轴值选项:vAxis: {
format: '#%'
}
关于google-visualization - 在谷歌图表的 Y 轴值中显示百分比符号 [%],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21986312/