Geo Map

15 views
Skip to first unread message

hdufo

unread,
Nov 18, 2011, 6:27:35 AM11/18/11
to Google Visualization API
Hello,
I use the packages geochart
It work fine in resolution provinces for France.
I have for exemple:
data.setValue(0, 0, 'FR-L');
data.setValue(0, 1, 200);
and when the mouse is on this region, i have in the infowindow (i this
is the good name in english) like this:
FR-L
Popularity 200
I don't see in the description how i can have my owner info, like, for
example, Limousin, population = 200

I hope you anderstand my question

Thanks a lot

asgallant

unread,
Nov 18, 2011, 9:13:06 AM11/18/11
to google-visua...@googlegroups.com
The layout of the tooltip is:

"Column 0 value"
"Data Column Name": "Data Column Value"

You can set the formatted value of a cell to override what the API would normally place there.  Ex:

data.setFormattedValue(0, 0 , 'Limousin');

would change 'FR-L' to 'Limousin' in the tooltip.  You can use DataTable#addRow() instead of setValue() as a shortcut:

data.addRow([{v: 'FR-L', f: 'Limousin'}, 200]);

which populates the entire row.  Pass it an array with values for each column in the row, where each value is either the data type appropriate for that column (string, number, etc) or an object {v: value, f: 'string formatted value'}.
Reply all
Reply to author
Forward
0 new messages