Subject: Re: [visualization-api] Scripts for Google Charts
not loading, but the Loader loads just fine



Just sent you a private reply containing a full copy of the source code for the project. Thank you so much for offering to look at it!

On Wednesday, January 11, 2017 at 12:54:21 PM UTC-5, Daniel LaLiberte wrote:Eric,
I can't tell from what you have posted what might be happening.  If you could point me at an actual web page, I could look into it.  Even if it works, I can look at your side of the code to tell if it is being done correctly.  Email me privately if you don't want it to be public.
The problem is likely to be in how you call google.charts.setOnLoadCallback() and whether you accidentally give access to code that tries to draw charts before the code is fully loaded.
If you want to debug further on your side, try opening the debugger and stop on exceptions.  That should catch the exception before it is turned into a little red "Error" box.  But this may not be very helpful since it will be in obfuscated compiled code.
Regarding use of the jsapi loader, I wouldn't recommend even trying that, though I am unsure why it would be complaining about 'gantt' since I thought we had released it there at least a couple times. 

On Wed, Jan 11, 2017 at 12:34 PM, Eric Defore <eric....@xxxxxxxxx> wrote:
I've created an application that uses the Gantt Chart and for most users it works just fine. They host the application on their own server and it uses the "newer" method of loading the styles/scripts which my code then leverages to create a Gantt Chart.

It includes the necessary scripts like so:

google.charts.load( 'current', {
        'packages': ['gantt'],
} );



This works just fine most of the time and loads the necessary scripts, as seen here. 

But for some reason, on the User's website it only loads these scripts. So, only the Loader itself is present and none of the actual scripts we need.

This causes Google Charts to return its (Entirely unhelpful) little red "Error" box without any details logged to the Browser Console. I could send them a build with Debug set to true, but since it isn't loading the scripts at all I don't think this is an issue with the code actually creating the Chart.

The User reports that they're doing nothing to block any requests to "gstatic.com" and that on their Staging site where they've disabled all forms of caching this still persists.

----

So I figured, "Ok, let's see if I can get everything in a single request. That should break through this barrier, right?"
However, if I try to use the deprecated Loader to grab the necessary styles and scripts in a single go, it tells me the Package doesn't exist. I'm assuming this is because the Gantt Chart is newer and it wasn't added to the old, deprecated API.

The following JSON is used to create the URL:

{  
   "modules":[  
      {  
         "name":"visualization",
         "version":"1.0",
         "language":"en_US",
         "packages":[  
            "gantt"
         ]
      }
   ]
}
I tried naming the Package "ganttchart" as well with no success. It just says that the Package doesn't exist.

---
Has anyone else experienced this? Has anyone found a way around it? I haven't been able to replicate what the user is experiencing which has made debugging very difficult.

--
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-visualization-api+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/01b9a45c-565e-48b9-b739-404534c34b67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Daniel LaLiberte
dlali...@Google.com   5CC, Cambridge 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 google-visualization-api+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to google-visualization-api@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/2c086b46-3fbe-4164-91ea-9dfb0dd29cb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Programming list archiving by: Enterprise Git Hosting