javascriptjquery

How can we use google charts offline?


currently we are using https://www.gstatic.com/charts/loader.js for google charts. Is there any possible way to use this API offline?


Solution

  • NO!

    Your users' computers must have access to https://www.gstatic.com/charts/loader.js in order to use the interactive features of Google Charts. This is because the visualization libraries that your page requires are loaded dynamically before you use them. The code for loading the appropriate library is part of the included script, and is called when you invoke the google.charts.load() method.

    Our terms of service do not allow you to download the google.charts.load or google.visualization code to use offline.

    https://developers.google.com/chart/interactive/faq

    If you want alternative, use d3 js etc.