with google viz loaded function