mpx200 / ng-dygraphs

Angular 2+ library for support of dygraphs(http://dygraphs.com) charts
MIT License
3 stars 9 forks source link

Reference Error: Dygraph is not defined #23

Closed nablahero closed 5 years ago

nablahero commented 6 years ago

Hi,

i get the following error:

core.js:1440 ERROR ReferenceError: Dygraph is not defined at eval (ng-dygraphs.es5.js:59) at ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:4724) at ZoneDelegate.invokeTask (zone.js:420) at Zone.runTask (zone.js:188) at ZoneTask.invokeTask (zone.js:496) at ZoneTask.invoke (zone.js:485) at timer (zone.js:2025)`

I did install ng-dygraphs with

npm install ng-dygraphs --save but got the following warning:

npm WARN @schematics/angular@0.1.13 requires a peer of @angular-devkit/schematics@0.0.46 but none is installed. You must install peer dependencies yourself. npm WARN @schematics/schematics@0.0.13 requires a peer of @angular-devkit/schematics@0.0.46 but none is installed. You must install peer dependencies yourself.`

I added the module in app.module and I called it like that:

<ng-dygraphs [data]="data" [options]="options"> </ng-dygraphs>

Can you guys help me out with this? I looks like it can not find the Dygraphs library. Any dependency issue?

JimiC commented 6 years ago

In https://github.com/mpx200/ng-dygraphs#installation says:

dygraphs is a dependency and should be installed along with the module.

Just out of curiosity, what npm version do you use?

Anjithapushparaj commented 2 years ago

Hi I got the same error while using dygraph. How you resolved it? Help me plz..

mpx200 commented 2 years ago

@Anjithapushparaj npm install ng-dygraphs --save OR if you are using yarn then yarn add ng-dygraphs