Hi Rashmy,

Since you say you are not calling google.setOnloadCallback(), how do you
guarantee that the code that is loaded by your google.load() call is done?
That is the job of the setOnloadCallback.  I suggest you try that, and
inside the function that gets called by that callback, then you can make
your ajax call to get data and call drawChart.

Hope that helps.

On Thu, Jan 1, 2015 at 12:21 PM, <[email protected]> wrote:

> Hi
>
> I want to embed the chart within a php page to which headers have already
> been sent.
> I have a template that calls a number of js files, to one of which I have
> added the drawchart function.
>
> In the template file, I have the line of code,
> <script type="text/javascript" src="http://www.google.com/jsapi";></script>
>
> In another js file, I have
> google.load("visualization", "1", {packages:["corechart"]});
> and this js file has been called in the template file.
>
> I want the drawchart function to be called within another js function and
> need to pass arguments to drawChart().
>
> Within a js function, I am making an ajax call, which onComplete, I need
> to call drawChart with some arguments.
>
> I do not call, google.setOnloadCallback. OnComplete of the ajax request, I
> am calling drawChart with the args,
> but the chart is not getting drawn. It is giving the 'undefined is not a
> function' error.
>
> Any suggestions on how to get the chart done?
>
> Thanks & Regards,
> Rashmy
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to