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

Support for redrawing chart from the external script. #45

Closed
wants to merge 2 commits into from
Closed

Support for redrawing chart from the external script. #45

wants to merge 2 commits into from

Conversation

Cervajz
Copy link
Contributor

@Cervajz Cervajz commented Oct 28, 2012

Hello :c)

thanks for this great library. It had just one inconvenience - it wasn't possible to redraw chart from the outside - for example when you changed size of the browser. It could be possible with this little patch.

I "extracted" function for drawing, so it's not anonymous anymore, so you can call it from your own script. Name of the function is defined from the element_id, like this:

draw_#{element_id}_Chart()

If element_id contains dashes, they are converted to the underscores.

Have a nice day :)

@winston
Copy link
Owner

winston commented Oct 30, 2012

In Pull Request 39 #39, I incorporated listeners. Does that help?

@Cervajz
Copy link
Contributor Author

Cervajz commented Oct 31, 2012

Listeners are used for different puprpose. They can't help you to redraw the chart after window resizing. The only way how to do it is draw it again - with datatable.

@rvsingh
Copy link

rvsingh commented Aug 15, 2013

It would be great if it can redraw the graph after window re-sizes.

http://stackoverflow.com/questions/18258629/re-sizing-google-charts-with-fluid-bootstrap-layout

@winston
Copy link
Owner

winston commented Aug 22, 2013

I have merged these changes, updated the function name, fixed and added specs.

You should be able to redraw the chart from within your JS now. Thank you!

@winston winston closed this Aug 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants