I have a question about google chart

32 views
Skip to first unread message

2141...@qq.com

unread,
Apr 17, 2012, 6:23:22 AM4/17/12
to Google Visualization API
Hi,Hello Everybody,I have a question about google chart,I draw
a statistical chart, The type of Y Axis is percent,but when I
hover mouse to data posin,The Tooltip is decimal, I want is show
percent 。
Do you understand ?

asgallant

unread,
Apr 17, 2012, 9:39:18 AM4/17/12
to google-visua...@googlegroups.com
You need to use a formatter on the DataTable column, like this:

var data = new google.visualization.DataTable();
// populate the DataTable
....
// format the second column in the DataTable 
var formatter = new google.visualization.NumberFormat({pattern: '#,###%'});
formatter.format(data, 1);
Reply all
Reply to author
Forward
0 new messages