Google Charts Offline

Questions related to using nuBuilder Forte.

Google Charts Offline

Postby apmuthu » Sun Jan 10, 2021 2:03 pm

In index.php file in both v4 and v4.5, we find a url to get the online version of Google Charts loader js file.

This does not bode well for those using NuBuilder applications in offline (non net) mode.

GitHub has a repo where Google Charts can be used offline:
https://github.com/changkejun/google-chart-offline

Stack Overflow has a nice discussion and workarounds for the same too at:
https://stackoverflow.com/questions/612 ... it-offline

Another developer has provided one for version 44 of Google Charts at:
https://www.dropbox.com/s/4cd7zbdvv2mlg ... c.zip?dl=0
Attachments
google-chart-offline-master.zip
Chang Ke Jun GitHub google chart offline fileset
(888.66 KiB) Downloaded 4 times
gstatic.zip
Independent Developer offline google charts
(337.68 KiB) Downloaded 3 times
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Google Charts Offline

Postby kev1n » Sun Jan 10, 2021 3:31 pm

From https://developers.google.com/chart/int ... aldownload:


Can I use charts offline?
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.



Can I download and host the chart code locally, or on an intranet?
Sorry; our terms of service do not allow you to download and save or host the google.charts.load or google.visualization code. However, if you don't need the interactivity of Google Charts, you can screenshot the charts and use them as you wish.
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1193
Joined: Mon Oct 15, 2018 2:13 am

Re: Google Charts Offline

Postby apmuthu » Mon Jan 11, 2021 1:02 am

Hence we must clearly mention that nuBuilder cannot be used offline because of this Google TOS and that the workaround suggested can be used at one's own risk. The workaround can be explicitly stated here or a link to this post provided now that your commit has encapsulated it in a wrapper function. Do not know where else it may be used to justify wrapping it.

Better still, use another completely open source chart solution - google free.
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Google Charts Offline

Postby kev1n » Mon Jan 11, 2021 1:25 am

nuBuilder can be used offline. Just set $nuConfigIncludeGoogleCharts = false in nuconfig.
And you might want to have a look at the Apex Charts (Include them with $nuConfigIncludeApexCharts = true). They can be used offline.
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1193
Joined: Mon Oct 15, 2018 2:13 am


Return to General