angular2-google-chart icon indicating copy to clipboard operation
angular2-google-chart copied to clipboard

How to integrate angular2-google-chart with angular-cli?

Open devrockzz opened this issue 9 years ago • 6 comments

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

devrockzz avatar Aug 18 '16 05:08 devrockzz

I would like to know this as well. It will be helpful for greater adoption.

manish153 avatar Aug 26 '16 06:08 manish153

@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

RicardoVaranda avatar Sep 13 '16 10:09 RicardoVaranda

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.

BenDevelopment avatar Nov 06 '16 19:11 BenDevelopment

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 !

sup99 avatar Feb 16 '17 17:02 sup99

@RicardoVaranda: Thanks a lot.

  1. thing i want to ask, that how to show location on hover of grey section.

sudthenerd avatar Dec 10 '17 14:12 sudthenerd

@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

ariklu avatar Mar 07 '18 12:03 ariklu