Using google graph api with wordpress

You should run updatepage() function after loading the google jsapi script.

try jquery ready inside updatepage like this:

function updatepage(){    // this line added by me
    jQuery(document).ready(function ($) {

        // Load the Visualization API and the piechart package.
        ....
        ....
        chart.draw(data, options);
    }       
} 

or you can see this shortcode code plugin for simple chart builder using google jsapi that I working on.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)