google.visualization.Timelin missing?

1,205 views
Skip to first unread message

Nicholas Poh

unread,
Sep 24, 2013, 10:53:44 PM9/24/13
to google-visua...@googlegroups.com
Hi,

When I tried to load the timeline package with the following line,
google.load('visualization', '1', {packages:['timeline']});

I'm getting error,
ReferenceError: Dygraph is not defined @ https://www.google.com/uds/api/visualization/1.0/01bfd211c0a350e1b7454e7b4342565b/format+en,default,table.I.js:494

Thus executing the following line,
new google.visualization.Timeline (...)

gives me,
TypeError: google.visualization.Timeline is not a constructor

This started today.

Thanks.

asgallant

unread,
Sep 25, 2013, 12:11:24 AM9/25/13
to google-visua...@googlegroups.com
I can't replicate the problem.  Can you post a link to a page or a jsfiddle that demonstrates the problem?

Nicholas Poh

unread,
Sep 25, 2013, 2:03:25 AM9/25/13
to google-visua...@googlegroups.com
Hi,

Though the following is not the best sample to find the error, but I managed to replicate the same issue I'm having with my current app.

Go to,
http://code.google.com/apis/ajax/playground/?type=visualization

Choose anything from the left. I would recommend Annotated Timeline though. Then add the following on top,

google.load('visualization', '1', {packages:['timeline']});

and replace,
  var annotatedtimeline = new google.visualization.AnnotatedTimeLine(
with
  var annotatedtimeline = new google.visualization.Timeline(

Open Firefox error console (or any browser that allows that). Run the code. Note that the following appears in the javascript error,
--
[14:00:46.835] ReferenceError: Dygraph is not defined @ http://www.google.com/uds/api/visualization/1.0/01bfd211c0a350e1b7454e7b4342565b/format+en,default,annotatedtimeline+en_US.I.js:546
[14:00:47.139] TypeError: google.visualization.Timeline is not a constructor @ http://savedbythegoog.appspot.com/retrieve_cache?unique_id=0f5cc6ce945d8820ebbc1737c67bea251e329f10:39

Mark Huggins

unread,
Sep 25, 2013, 9:11:13 AM9/25/13
to google-visua...@googlegroups.com
We are having the same issue it only started overnight. It was working fine yesterday and now today the timeline won't load. We also use a few of the other charts (pie, bar, etc... and they all seem to be loading fine)


On Tuesday, September 24, 2013 10:53:44 PM UTC-4, Nicholas Poh wrote:

Nicholas Poh

unread,
Sep 25, 2013, 9:13:08 AM9/25/13
to google-visua...@googlegroups.com

Hi,

I'm glad that I'm not the only one having this issue.

Thanks for confirming.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/nOGY4EjAI_Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

asgallant

unread,
Sep 25, 2013, 10:10:44 AM9/25/13
to google-visua...@googlegroups.com
Still can't replicate.  That throws an error when trying to draw, which is expected given that the DataTable isn't in the right format.

asgallant

unread,
Sep 25, 2013, 10:12:07 AM9/25/13
to google-visua...@googlegroups.com
Do the example charts work on the Timeline's documentation page?

Nicholas Poh

unread,
Sep 25, 2013, 10:26:25 AM9/25/13
to google-visua...@googlegroups.com

The timeline documentation page charts draw properly though. It has been so since I'm having this issue.

--

Sergey Grabkovsky

unread,
Sep 25, 2013, 10:26:53 AM9/25/13
to google-visua...@googlegroups.com
Hello, we're sorry to hear that you're having issues. What browser and operating system are you using?

- Sergey


--
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 google-visualizati...@googlegroups.com.

asgallant

unread,
Sep 25, 2013, 10:31:18 AM9/25/13
to google-visua...@googlegroups.com
If the charts on the documentation page work, then there is likely something in you code that isn't working.  Can you modify this jsfiddle to replicate your problem?  http://jsfiddle.net/asgallant/4sYfR/
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

Nicholas Poh

unread,
Sep 25, 2013, 10:31:30 AM9/25/13
to google-visua...@googlegroups.com

Hi,

I'm tested using Firefox and Internet Explorer running on Windows 8.

Sergey Grabkovsky

unread,
Sep 25, 2013, 10:38:40 AM9/25/13
to google-visua...@googlegroups.com
Are you running a particularly old version of FireFox? I just tested it on the latest version, and I can't reproduce your error. Were you able to modify asgallant's jsfiddle to replicate your problem?

- Sergey

Nicholas Poh

unread,
Sep 25, 2013, 11:10:29 AM9/25/13
to google-visua...@googlegroups.com

The sample at jsfiddle seems to work. But not on my site. The issue is very recent, just started this morning. It was working just fine.

Also it has nothing to do with the coding as the root cause of the issue is from the, "google.load(....'timeline'...)

It cause an js error, "Dygraph is not defined"

Sergey Grabkovsky

unread,
Sep 25, 2013, 11:17:31 AM9/25/13
to google-visua...@googlegroups.com
Is there any way you can link us to your site? You may email me directly at gra...@google.com, if you're more comfortable with that.

- Sergey

Mark Huggins

unread,
Sep 25, 2013, 11:50:45 AM9/25/13
to google-visua...@googlegroups.com
Sergey,
   Just running the below html code generates the error. No need to even draw the chart maybe it has something to do with the way I'm loading the js?

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="//www.google.com/jsapi"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.js"></script>
    <script type="text/javascript">
        google.load("visualization", "1", {packages:["corechart"]});
        google.load('visualization', '1', {packages:['table']});
        google.load('visualization', '1', {packages: ['treemap']});
        google.load('visualization', '1', {packages: ['timeline']});
    </script>
    <title></title>
</head>
<body>
<div id="chart_div"></div>
</body>
</html>

On Tuesday, September 24, 2013 10:53:44 PM UTC-4, Nicholas Poh wrote:

Sergey Grabkovsky

unread,
Sep 25, 2013, 11:54:38 AM9/25/13
to google-visua...@googlegroups.com
Mark, multiple google.loads are not recommended anymore, and can generate undefined behavior. To load multiple packages, you can put them all in the same array, like so: google.load("visualization""1"{packages:["corechart"'table''treemap''timeline']});

- Sergey


--

Mark Huggins

unread,
Sep 25, 2013, 11:58:15 AM9/25/13
to google-visua...@googlegroups.com
Sergey,
    Thank you very much for the assistance seems to have resolved the issue timeline chart now loads without the error.

-Mark

  
On Tuesday, September 24, 2013 10:53:44 PM UTC-4, Nicholas Poh wrote:

Nicholas Poh

unread,
Sep 25, 2013, 12:12:44 PM9/25/13
to google-visua...@googlegroups.com

Hi,

Does loading the packages in array solved the issue? Or it was resolved on its own?

Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/nOGY4EjAI_Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

Sergey Grabkovsky

unread,
Sep 25, 2013, 12:17:15 PM9/25/13
to google-visua...@googlegroups.com
Nicholas, using multiple google.loads is unrecommended and unsupported, and may result in undefined behavior. If you have multiple google.load calls on your page, things may go wrong, and it is strongly recommended that you combine them into one call, like I suggested to Mark. Please try this and let us know if this fixes your issue.

If you do not have multiple google.load calls, then it is unlikely that my suggestion will fix your issue, and we would appreciate your cooperation with helping us figure out what your problem is.

- Sergey


--
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 google-visualizati...@googlegroups.com.

Nicholas Poh

unread,
Sep 25, 2013, 9:28:38 PM9/25/13
to google-visua...@googlegroups.com

Hi Sergey,

Putting the packages into an array with one Load solved the issue. Weird that it was working fine previously.

Thanks for the help

Thomas Rybka

unread,
Sep 26, 2013, 10:47:51 AM9/26/13
to google-visua...@googlegroups.com
We actually think we identified why it worked previously, and may have a fix in the works for that previous use-case.

Glad that the one-array solution works for you.

-Tom

Nicholas Poh

unread,
Sep 26, 2013, 10:51:45 AM9/26/13
to google-visua...@googlegroups.com

Hi Thomas,

That's great. Though since having multiple load is not a good practice, I think there should be more informative guide regarding this in the documentation out tutorial.

Thanks for the great support.

Thomas Rybka

unread,
Sep 26, 2013, 10:54:41 AM9/26/13
to google-visua...@googlegroups.com
Yes, we will be making documentation improvements to this effect.

Thanks for the report!

Marcello Pato

unread,
May 17, 2017, 4:04:16 PM5/17/17
to Google Visualization API
Thank You so much! But, how many items on an array can be added?
Reply all
Reply to author
Forward
0 new messages