Treemap node name

40 views
Skip to first unread message

Dominic

unread,
Dec 5, 2011, 8:17:33 AM12/5/11
to Google Visualization API
Hi all, i am experimenting with a treemap where different parent nodes
have identical node members, i.e.
["Population",null,0,0],
["Region_A","Population",0,0],
["Region_B","Population",0,0],
["Region_C","Population",0,0],
["Adult","Region_A",1,0],
["Minor","Region_A",1,0],
["Adult","Region_B",1,0],
["Minor","Region_B",1,0],
["Adult","Region_C",1,0],
["Minor","Region_C",1,0]

Currently all nodes are diplayed under parent node "Region_A". If I
change the names (node ID) to distinct names the association to the
parent node works correctly. Is there any other option/workaround then
defining unique node names?

Thanks,
Dominic

asgallant

unread,
Dec 5, 2011, 9:55:27 AM12/5/11
to google-visua...@googlegroups.com
Use the {v: value, f: 'formatted value'} object to create unique nodes with the same display names: 

["Population",null,0,0],
["Region_A","Population",0,0],
["Region_B","Population",0,0],
["Region_C","Population",0,0],
[{v'Adult_A'f"Adult"},"Region_A",1,0],
[{v'Minor_A'f"Minor"},"Region_A",1,0],
[{v'Adult_B'f"Adult"},"Region_B",1,0],
[{v'Minor_B'f"Minor"},"Region_B",1,0],
[{v'Adult_C'f"Adult"},"Region_C",1,0],
[{v'Minor_C'f"Minor"},"Region_C",1,0]
Reply all
Reply to author
Forward
0 new messages