agiliq / django-graphos

Django charting made *really* easy.
http://agiliq.com/demo/graphos
BSD 2-Clause "Simplified" License
442 stars 98 forks source link

Add support for gchart's newer library loader #113

Open cmtjk opened 7 years ago

cmtjk commented 7 years ago

After encountering several problems loading Google Charts (gchart) via Ajax I've added support for Google Chart's preferred library loading method.

As of Feburary 16, 2016:

The version of Google Charts that remains available via the jsapi loader is no longer being updated consistently. The last update, for security purposes, was with a pre-release of v45.

Please use the new gstatic loader from now on [...]

Source

For compatibility reasons both methods are supported but you may decide to dismiss the old method in favor of the new one.

The following problems were solved with the proposed changes:

In addition using the new library loading method enables true asynchronous Ajax requests for loading charts whereas async: false must have been set using the old method.

To use the preferred method you should load the library like described in this example. This may be added to your documentation.