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 <[email protected]> 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
> <https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code>
> 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.
> <https://cloud.githubusercontent.com/assets/7770631/21809230/c3f1c9de-d714-11e6-9474-f9f64357ad69.png>
>
>
> But for some reason, on the User's website it only loads these scripts.
> <https://cloud.githubusercontent.com/assets/7770631/21809239/d0060852-d714-11e6-8cc0-e5aa88c51b22.png>
>  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
> <https://developers.google.com/loader/#auto-loading> 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 [email protected].
> To post to this group, send email to google-visualization-api@
> 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
> <https://groups.google.com/d/msgid/google-visualization-api/01b9a45c-565e-48b9-b739-404534c34b67%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   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 [email protected].
To post to this group, send email to [email protected].
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/CAOtcSJMeHzdYWeSgMbwYqsa9Ki19h_Yxtu_%3DpVK%3DZMPPHeAdtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to