google-chart
google-chart copied to clipboard
Allow access to TreeMap's other methods (e.g. `goUpAndDraw`)
https://jsfiddle.net/8vhn8fry/ I'm not sure if this is a bug or I'm just using it wrong. Try click on a category, and then right click on the map to go back to All Categories. Now click the redraw button. Instead of staying in "All Categories" view, the redrawn treemap will be at the sub-category that you just clicked on.
On a sidenote, treemap API has a lot of additional methods: https://developers.google.com/chart/interactive/docs/gallery/treemap#methods
How do I access these methods in google-chart Polymer wrapper?
Yes, there is currently a bug in the TreeMap selection for which I have a change open (but it has comments to address... sigh). I think you are seeing the same bug... It's a bummer. The work-around is to reset selection on redraw. As for the extra methods, they are not currently exposed. I was thinking about having the google-chart element listen for a chart-action event that it would then pass along internally. What do you think?
Yeah if that works. I think another way would be having a tree-map element, and line-chart element, etc. They can all share a google-chart-behavior
Yeah, I think that's definitely an alternative. I think the event model is probably fine for this particular use-case, though, because it's methods are not called through document bindings.
So, apologies, I just got around to looking at the steps in your bug. This is not due to the selection bug that I thought it was. Haha. However, I will add your issue to my selection fix, too. I'm not sure when it will land in the public release, though.