Aha! I cracked it: http://jsfiddle.net/asgallant/NpsUh/7/ 

The treemap should now work for any tree of arbitrary depth.  I added a few 
US states to the data so you can see it work.  Navigate back up the tree by 
clicking the header at the top of the chart.

On Thursday, September 13, 2012 12:19:01 PM UTC-4, asgallant wrote:
>
> I've been trying to work out a good solution for that, and I haven't come 
> up with anything as of yet.  All of the solutions I have thought of so far 
> are overly complex and become exponentially more so as you add more layers 
> to the tree.  I suspect the solution will involve a recursive algorithm 
> that parses the tree and builds an appropriate DataTable for any given node.
>
> There might be an even better solution, though.....hmmm...let me think on 
> this.
>
> On Thursday, September 13, 2012 9:08:46 AM UTC-4, TUwel wrote:
>>
>> ah oke thanks
>>  
>> one more question:
>> if i have 3 layers how can i group it, because i set the 3rd layer parent 
>> as Global or i missunderstand it? 
>> can i group it with 3 layers in the select function? or dont know ..
>>  
>> but thanks 4 all  u are very patient :-)
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/0pYCwghY9fkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to