using google visualization

Discussion in 'Javascript' started by rakata.warrior@gmail.com, Jun 29, 2010.

  1. Guest

    Hello. I have a problem with google visualization (http://
    code.google.com/intl/ru-RU/apis/visualization/documentation/
    using_overview.html). Examples give by google are working fine, but if
    I move google.load from scripts body to any function, loaders stops
    work. I mean, this code

    function load(){
    google.load('visualization', '1', {'packages':
    ['piechart']});
    google.setOnLoadCallback(drawChart);
    }

    doesn't work while this one

    <html>
    <head>
    <script type="text/javascript" src="http://www.google.com/jsapi"></
    script>
    <script type="text/javascript">
    google.load('visualization', '1', {'packages':['piechart']});
    google.setOnLoadCallback(drawChart);

    does pretty good. But I have a website with many frames and I need to
    make various graphs on every frame so the idea was to make a function
    in a javascript library file which would draw needed graphs. But I
    can't do it because I have no idea what's going on with google.load -
    why doesn't it work when calling inside of a function?
    Any help would be greatly appreciated.
    , Jun 29, 2010
    #1
    1. Advertising

  2. wrote:
    ^^^^^^^^^^^^^^^^^^^^^^^^
    Who?

    > Hello. I have a problem with google visualization (http://
    > code.google.com/intl/ru-RU/apis/visualization/documentation/
    > using_overview.html).


    You are looking for
    <http://groups.google.com/group/google-visualization-api>.

    > Examples give by google are working fine,


    That is a useless statement. *Which* examples, *where* are they running
    fine?

    > but if I move google.load from scripts body to any function, loaders stops
    > work. I mean, this code
    >
    > function load(){
    > google.load('visualization', '1', {'packages':
    > ['piechart']});
    > google.setOnLoadCallback(drawChart);
    > }
    >
    > doesn't work


    That is no error description at all.

    > while this one
    >
    > <html>


    Not Valid. <http://validator.w3.org/>

    > <head>
    > <script type="text/javascript" src="http://www.google.com/jsapi"></
    > script>
    > <script type="text/javascript">
    > google.load('visualization', '1', {'packages':['piechart']});
    > google.setOnLoadCallback(drawChart);
    >
    > does pretty good. But I have a website with many frames


    That is no useful description either.

    > and I need to make various graphs on every frame so the idea was to make a
    > function in a javascript library file


    There is no "javascript". There is also no "library file" there.

    > which would draw needed graphs. But I can't do it because I have no idea
    > what's going on with google.load -


    That is the price tag attached to minified, apparently underdocumented,
    needlessly dynamically loaded, code. BTW, I have tried
    <http://code.google.com/apis/visualization/documentation/examples.html>;
    it took 10 seconds before I could scroll the document in Iceweasel 3.6.4
    without hassle. The average visitor would have navigated away by then.
    This should give you pause.

    > why doesn't it work when calling inside of a function?


    Probably it does, but given overall Google code quality it might not.

    > Any help would be greatly appreciated.


    <http://jibbering.com/faq/#posting>
    <http://www.catb.org/~esr/faqs/smart-questions.html>


    PointedEars
    --
    var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
    Thomas 'PointedEars' Lahn, Jun 29, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HPjtune
    Replies:
    0
    Views:
    1,153
    HPjtune
    Aug 25, 2003
  2. Replies:
    3
    Views:
    405
  3. Federico

    JComboBox visualization on Linux

    Federico, Aug 2, 2004, in forum: Java
    Replies:
    0
    Views:
    325
    Federico
    Aug 2, 2004
  4. Sam Hwang
    Replies:
    1
    Views:
    380
    Lee Ryman
    May 2, 2005
  5. FBergemann
    Replies:
    1
    Views:
    515
    Donovan Rebbechi
    Jan 23, 2004
Loading...

Share This Page