Open devrockzz opened 8 years ago
I would like to know this as well. It will be helpful for greater adoption.
@devrockzz @manish153 I've made a tutorial here on how you guys can achieve this.
https://github.com/RicardoVaranda/Angular2-Google-Charts
All credits go to @vimalavinisha
Thank you for this tutorial. I figured out that your are loading that chart api each time in the diretive. It makes the chart display very slow. Maybe we can upgrade this script.
Hi guys and thanks for the tutorial ! Yes. I noticed the poor performance and it was a no-go for me, but the chart supports 2 graphics that I needed so I had no choice to try to make it work better. I simply did this: 1) I just called this.drawGraph() on the chart component (i especially skipped loading the package) 2) On the index page, right after including the chart script, I only called once the following line google.charts.load('current', { 'packages': ['line'] });
I only needed to draw a couple of line charts, so I grabbed the minimum and it works blazing fast now. I hope this helps someone, cheers !
@RicardoVaranda: Thanks a lot.
@sup99 could you please allaborate on step 1. in your answer. you call "this.drawGraph() on the chart component" ? -in angular component.ts file where is "loading the package" that you skip?
I really need this fix, but I just do not understand what to do
Thank you in advance
Please kindly guild me how i can integrate it with angular-cli as i am trying but its not working . So please give me the proper steps how i can integrate it with angular cli