vimalavinisha / angular2-google-chart

Angular 2 google chart
MIT License
59 stars 45 forks source link

Error in angular2 ts directive when compiling #53

Open theoscat opened 7 years ago

theoscat commented 7 years ago

hi,

I get this error when i try to compile my application :

node_modules/angular2-google-chart/directives/angular2-google-chart.directive.ts(33,15): error TS7006: Parameter 'chartOptions' implicitly has a n 'any' type. node_modules/angular2-google-chart/directives/angular2-google-chart.directive.ts(33,29): error TS7006: Parameter 'chartType' implicitly has an ' any' type. node_modules/angular2-google-chart/directives/angular2-google-chart.directive.ts(33,40): error TS7006: Parameter 'chartData' implicitly has an ' any' type. node_modules/angular2-google-chart/directives/angular2-google-chart.directive.ts(33,51): error TS7006: Parameter 'ele' implicitly has an 'any' t ype. node_modules/angular2-google-chart/directives/angular2-google-chart.directive.ts(54,33): error TS2345: Argument of type '{ message: string; row: any; column: any; selectedRowValues: any[]; }' is not assignable to parameter of type '{ row: number; column: number; }'. Object literal may only specify known properties, and 'message' does not exist in type '{ row: number; column: number; }'. Can someone help me with this ? I'm using Angular 4.3.0 and the latest version of angular2-google-chart.

Thanks,

Theo

efgonz commented 7 years ago

There is no support here about this?

theoscat commented 7 years ago

I started working again on my project. I've found out that the typescript version i'm using is not compatible with the way the directive is coded. You may want to install a specific typescript version it may work for you (2.1.6).

In my case i have a bunch of other package not compatible with previous version like 2.1.6. I will try to update the directive on my own to make it compilable and see what happen.

Tell me if you want an update on this topic.

Theo

jjonas3 commented 6 years ago

Any update on it ? I have the same problem and I'm new to typescript. 'll try to figure out how to downgrade my ts back to 2.1.6

Thanks, Jerry

theoscat commented 6 years ago

Hello Jerry,

I've totaly gave up on this package. I'm not experienced enough to modify the package.

However i know that if you're using npm, you can downgrade your typescript version by uninstalling the current version => npm uninstall typescript --save then installing a specific one => npm install typescript@2.1.6 --save

Théo

jjonas3 commented 6 years ago

Hi Theo, I'm plowing along with this idea right now. Worked for the sample. Pulling my data in as we speak, https://stackoverflow.com/questions/37542408/angular2-google-charts-how-to-integrate-google-charts-in-angular2

Thanks

theoscat commented 6 years ago

Glad to know that it's working on your end. I've used something else for my project. Injecting google api chart directly without any npm package. I think it's not the best way to do it but i'm fine with it working for my personal project.