Have a percent into a column chart generated from Google Spreadsheet

7,319 views
Skip to first unread message

ZimXaM

unread,
Sep 16, 2009, 4:14:57 PM9/16/09
to Google Visualization API, xa...@xavs.qc.ca, expe...@hotmail.com, c...@zimxam.net
Hello!

I've played a little bit with the Google Speadsheet and Visualization
API. I've hack the barChart XML from Speadsheet gadget to be able to
use the columnChart. Here is the result:

http://c1839dc2mch0nod2ngfu1h5p6okae3js.spreadsheets.gmodules.com/gadgets/ifr?up__table_query_url=https%3A%2F%2Fspreadsheets.google.com%2Ftq%3Frange%3DA153%253AC158%26headers%3D-1%26key%3DtbW940PrcdVQFo5qv367U1Q%26gid%3D0%26pub%3D1&up_title&up_chartTitle=J%27ai+un...&up_labelx&up_labely&up_legend=0&up_3d=0&up_stacked=0&up_min=0&up_max=1&up__table_query_refresh_interval=300&url=http%3A%2F%2Fwww.zimxam.net%2Fdivers%2FcolumnChart-gf.xml&parent=http%3A%2F%2Fwww.google.com

You can have a look on the XML gadget there: http://www.zimxam.net/divers/columnChart-gf.xml
. As you see, I change two words to make the columnChart work with
barChart code.

When people click on each column, they can see the percent of each
column. But, the problem is that in the generated column chart, the
vertical axis shows decimal values labels (0 to 1). I would like to
see these labels in percent (0 to 100%). Is that possible!?

Thank you for your help,

Maxime
ZimXaM.net
Skype: ZimXaM

VizGuy

unread,
Sep 17, 2009, 5:19:48 AM9/17/09
to google-visua...@googlegroups.com
Today there is no way to do it today.
The only idea I can think of is to keep the data in trix as percentage (0-100 instead of 0-1) and keep the formated values the same (54,00%).

Regards,
VizGuy

ZimXaM

unread,
Sep 17, 2009, 11:31:33 AM9/17/09
to Google Visualization API
Too bad... :-( I've read a little bit about the formatter into the API
Docs, but I'm sure how to integrate it in an XML gadget. Is there any
example?

Maxime

VizGuy a écrit :
> Today there is no way to do it today.The only idea I can think of is to keep

VizGuy

unread,
Sep 20, 2009, 4:42:27 PM9/20/09
to google-visua...@googlegroups.com
You may format the values in the spreadsheet itself as you want, using the UI.

As for writing gadgets, if you refer to writing your own custom gadget, you can find a simple example at http://code.google.com/apis/visualization/documentation/examples.html#custom_gadget

Regards,
VizGuy
Reply all
Reply to author
Forward
0 new messages