angular-google-chart / angular-google-chart

Google Chart Tools AngularJS Directive Module
http://angular-google-chart.github.io/angular-google-chart/
MIT License
883 stars 310 forks source link

Chart not displayed, message "No loader available" #352

Open carlzbg-cyber opened 3 years ago

carlzbg-cyber commented 3 years ago

Have been using 1.0.0-beta.1 together with Angular .js 1.7.9

Yesterday, 2021-06-21, the charts stopped displaying.

I made a change in the source code:

... function AgcLibraryLoaderProvider($injector) { // Built-in options: "jsapi", "gstatic", "null". var DEFAULT_LOADER = "gstatic"; // changed from "jsapi" ...

That will switch to the loading of gstatic.com/charts/loader.js

Now the charts are showing again.

jd-marta-koprowska commented 3 years ago

I have the same problem with version "0.1.0" (Angular 1.5.8)

carlzbg-cyber commented 3 years ago

You can make the same change that I did in ng-google-chart.js (the unminimized file).

Look up the function AgcLibraryLoaderProvider and modify the DEFAULT_LOADER string.

jd-marta-koprowska commented 3 years ago

In version '0.1.0' there is no 'DEFAULT_LOADER'...so I tried to update angular-google-chart to version 1.0.0-beta.1 but after that I have error in console 'Unknown provider: loaderProvider <- loader <- agcLibraryLoader <- GoogleChartService <- agcLibraryLoader'

carlzbg-cyber commented 3 years ago

So Angular is unable to find agcLibraryLoader. Did you make any other changes to the file? Try with the original 1.0.0-beta.1 to see if it runs and then make the modification.

nbering commented 3 years ago

Switching to the new loader is one of the things I kept the beta flag on for. It was always my intent to get some feedback and then switch the default and I didn't want to do that on a Semver minor.

That said, if the new loader is not working for some reason, that's probably one of the very few things I would go back and fix in this library. AngularJS is so far outside it's development lifecycle that I've been considering archiving the project.

nbering commented 3 years ago

Hmm... all that said... none of my examples are broken. I'd need more info to suggest a resolution.

carlzbg-cyber commented 3 years ago

There was a hickup at Google when version 51 of Google Charts was deployed. The problem was reported here: https://github.com/google/google-visualization-issues/issues/2913

--- Timeline cannot be rendered with upcoming version (v51) due to dygraph-tickers-combined.js cannot be found #2913 ---

Now, switching the loading from "jsapi" to "gstatic" helped out at the moment. Probably, Google has since then sorted out the problem, so that both ways of loading works. Anyway, it seems safer to use gstatic as Google recommends it.

Thank you for writing great library! It is most useful and we have been using it for years without any glitches.

As for Angular.js it will problably live on in some form. There are so many apps running out there. And moving to angular.io means rewriting your app from scratch...

nbering commented 3 years ago

There was a hickup at Google when version 51 of Google Charts was deployed.

Ah... yes. The releases for the Google Charts API rarely go un-noticed. But they do usually settle down on their own once all the cached endpoints expire.

As for Angular.js it will problably live on in some form. There are so many apps running out there. And moving to angular.io means rewriting your app from scratch...

I'm still here to answer questions if people need it, but I don't consider the project to be in active development since AngularJS itself is no longer supported. No official announcement about that, yet... but I may update the README soon to set realistic expectations.

I often get asked if I will write a component for the new Angular framework... but other people beat me to it, so I don't see a need.