adding support for embedded functions inside the google visualization#74
adding support for embedded functions inside the google visualization#74golsombe wants to merge 6 commits intowinston:masterfrom
Conversation
lib/google_visualr/base_chart.rb
Outdated
There was a problem hiding this comment.
Use the new Ruby 1.9 hash syntax.
Use 2 (not -3) spaces for indentation.
Surrounding space missing for operator '=>'.
Space inside { missing.
Space inside } missing.
Tab detected.
lib/google_visualr/base_chart.rb
Outdated
There was a problem hiding this comment.
Use the new Ruby 1.9 hash syntax.
Surrounding space missing for operator '=>'.
lib/google_visualr/base_chart.rb
Outdated
There was a problem hiding this comment.
Use the new Ruby 1.9 hash syntax.
There was a problem hiding this comment.
Should be https://developers.google.com/chart/interactive/docs/gallery/calendar instead.
|
Hi! Thanks for the PR! The stuff for the new calendar chart is great (and can be extracted as another PR), and I'll merge that. However, I am not so sure about introducing the embedded functions, as it doesn't look too good if you have to write JS in the code, which is precisely the reason for this gem. Do you have a specific use case that cannot be done with listeners? Let me know. Thank you! |
|
If you take a look at the Treemap example in Google charts, they As for the calendar, I wasn't quite ready to release it to the project but Thanks for google_visualr. It's a great time saver and makes the visuals Robert Hall
|
|
I had a look at the treemap example, and it seems like you can actually do So I guess in the Ruby code, you can also do the same, instead of creating additional functions. Will that work for you? I am thinking that this is an edge case for treemap, and am still unsure if it the gem should support adding functions at this point. |
I needed a new function inside the draw_chart() function to support custom tooltips for the TreeMap chart. Added a new add_function method along with additional spec for testing. Please advise?
Ex: