Vaadin7 + google charts

Hello,

I would like to push google charts into my project buld on Vaadin7.
I know that there is add-on related to Google charts, but it is for Vaadin 6, so it is not an option.

So I created a component which extends AbstractJavaScriptComponent and have just the following code in my js file

chart_google_PieChart = function() {
    google.load("visualization", "1", {packages:["corechart"]
});
}

When I run the application I have an error in browser console:
TypeError: Cannot read property ‘console’ of null
in the 0.js file. In case I comment the line 2 I have no errors.

I suppose that this line is runned before the code from
https://www.google.com/jsapi
is loaded by the component and that why is throwing an exception. How can I run some code in JS after all js files where downloaded from web? Some callback when JS component is ready?

Thank you.