How to set in tooltip percentage values?

216 views
Skip to first unread message

JuanJo

unread,
Aug 23, 2011, 5:53:06 PM8/23/11
to Google Visualization API
Hi Everyone

I'm using the LineChart visualization to show percentage values, and I
followed the settings that appear in the documentation, my problem is
that the tooltip box doesn't show the values in percentages, but the
setting done to the vAxis works fine, I don't understand if I missed a
setting or if I need to do a fix in my data.

To be explicit with the problem, the value of 0.51 is show as 0.51%
and not as 51%, but in the vAxis is shown correctly.

I will appreciate all the help you can give to this problem.

Thank You.

asgallant

unread,
Aug 24, 2011, 10:25:44 AM8/24/11
to google-visua...@googlegroups.com
You need to use the #setFormattedValue method of the DataTable object (or declare your rows in object literal notation, using {v: value, f: "formatted value"}) to make percentages display correctly.  

wamir

unread,
Aug 24, 2011, 10:40:28 AM8/24/11
to google-visua...@googlegroups.com
thank you for your replay.

I sow this formatting options for the data itself, but is it valid for the title as well?
In other words, can I set the chart title as part of the DataTable model?
I am currently using the chart option to specify the chart title.

thanks again!
Amir.

asgallant

unread,
Aug 24, 2011, 2:06:01 PM8/24/11
to google-visua...@googlegroups.com
AKAIK, the only way to set the chart title is to use the chart title options.
Reply all
Reply to author
Forward
0 new messages