Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow access to TreeMap's other methods (e.g. goUpAndDraw) #170

Open
NamTThai opened this issue Nov 15, 2016 · 4 comments
Open

Allow access to TreeMap's other methods (e.g. goUpAndDraw) #170

NamTThai opened this issue Nov 15, 2016 · 4 comments
Labels

Comments

@NamTThai
Copy link

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?

@wesalvaro
Copy link
Member

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?

@NamTThai
Copy link
Author

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

@wesalvaro
Copy link
Member

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.

@wesalvaro wesalvaro changed the title TreeMap's redraw bug Allow access to TreeMap's other methods (e.g. goUpAndDraw) Nov 19, 2016
@wesalvaro
Copy link
Member

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.

@wesalvaro wesalvaro added the bug label Feb 15, 2017
@wesalvaro wesalvaro added this to the Comprehensive API milestone Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants