-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing google.visualization #14
Comments
I've just published a new version of the package that exports the ScriptLoaderService. You'd have to inject this service into your custom component and then wait for onLoad to be called. Just see the Google-Charts-Component as an example. |
Sweet, thanks! |
so, I see how you used the script loader service to get the chart packages, but what if I want to make a formatter? I still need the google.visualization object, right? Like in your formatter example:
|
Having a new issue after updating to 0.0.7. All of my module.ngfactory.js files are throwing this error: |
i downgraded to 0.0.6 and had the same errors. had to go back to 0.0.5 to get rid of them |
Could you please provide explanation on how to reproduce this? |
I tried to create a stackblitz to reproduce, but I can't seem to. It must be something specific to my project. I can add that when I try to render the chart, I get this error after every change detection: I'm not sure what's going on or why it is happening with the newer versions only |
hm, I have been trying to create a stackblitz example that reproduces the errors I was seeing, but I just couldn't. I added all the modules my app imports and couldn't. So, I decided to try seeing if it was a package version issue with some other package, so I blew out my local node_modules and reinstalled everything and now the errors are gone from my project. Just one of those shruggie moments. Anyway, while building the stackblitz I also did an example of how to use the script loader service. Here is a snippet of how I used it to make a formatter that I think could help others:
It's worth noting that this.type needs to be the translated string that your package returns with [GoogleChartPackagesHelper.getPackageForChartName(this.type)]. That helper isn't available, so I had to look at it to figure out what string to actually pass. That helper being available would be nice. |
Inspired by #14 and also used the code example provided there
Thanks for the code example, I've added a new section to the readme based on it! 👍 I'm also happy that everything worked out for you, I'll close this one now. |
I was wondering how you suggest to add the google object to an angular project so it can be access for making formatters or some of the more advanced chart operations (currently trying to figure out how to do a bar diff chart)
Thanks
The text was updated successfully, but these errors were encountered: