scottharwell/cakephp-googlecharts-plugin — pull request #2 by PhantomWatson (2012-10-10 21:08:56+00:00)
Title: Support for callbacks

I needed a set of charts to be initially rendered in a hidden container, but discovered that they don't render properly unless visible: http://stackoverflow.com/questions/8577366/using-hide-and-show-with-google-visualization

To get around this, I added support for optional chart callbacks to the plugin so I could implement a function that hides charts after the 'ready' event is fired.

Example:

```php
$chart->type("LineChart)
//Options array holds all options for Chart API
->options($options)
->columns($columns)
->callbacks(array(
'ready' => "function(){\$('#chart_container_id').hide();}"
);
````