That is part of what is broken. I made a few small improvements here: http://jsfiddle.net/asgallant/NpsUh/5/
The treemap will now go up one if you click the header at the top of the chart, and it won't go to the wrong one when you click on leaves at the bottom of the tree. But to answer your question, the #getSelection method returns an array of objects with row and/or column properties that identify the data used to create the selected element in the DataTable or DataView used to draw the chart. The error here is that once you go down the chart, baseView is not the view used to draw the chart any more, so referencing it there was a poor choice on my part. This still needs work, particularly for handling trees more than two layers deep. I have the nagging suspicion that there is a relatively simple way of doing this, but the means are eluding me at this time. And you're not annoying me, I enjoy tacking these kinds of challenges. >;o) On Wednesday, September 12, 2012 11:07:46 AM UTC-4, TUwel wrote: > > ah oke thanks ... i don't want to annoy u, but if u have time, maybe can u > explain me how the select function works > because i wanted to fix it, for example if u click: Asia -> China -> then > he goes to Africa and don't stop > i understood that baseview : > > 0 1 > 2 3 > Africa Global sum(Africa) sum(Africa) America Global sum(America) > sum(America) Asia Global sum(Asia) sum(Asia) Europe Global sum(Europe) > sum(Europe) Global null sum(Global) > > sum(Global) > selectview : > > (0,0) China ... Brazil ... France ... Egypt > (0,1) Asia ... America ... Europe ... Africa > ... > every single value > > -- 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/-/7dZ1k9tF3FYJ. 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.
