Skip to content

Hello @dre2004 , @TravisLRiffle and @longtuan96 #112

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

Closed
ranineha003 opened this issue Apr 27, 2020 · 2 comments
Closed

Hello @dre2004 , @TravisLRiffle and @longtuan96 #112

ranineha003 opened this issue Apr 27, 2020 · 2 comments

Comments

@ranineha003
Copy link

Hello @dre2004 , @TravisLRiffle and @longtuan96
I could replicate locally. This is an issue within plotly.js itself and ES6 modules: plotly/plotly.js#3518

As a quick solution, changing in the tsconfig.json the compilerOptions.target property to "es5" might solve the issue. Or using PlotlyViaCDNModule or PlotlyViaWindowModule to avoid the angular transpiler to minify the plotly.js code.

Gonna close this issue. Please, reopen if it's still an issue 😸

Originally posted by @andrefarzat in #75 (comment)

The solution to go down to es5 cannot be opted in my case same goes to cdn using cdn option. Can any of you suggest me how to use PlotlyViaWindowModule in angular project as I am new to ploty js library and want to use its indicator type chart in my project.
I am using version 1.53.0 for plotly in my project
Angular CLI: 9.1.3
Node: 12.14.0
OS: win32 x64
Angular: 9.1.3

Any help is appreciated.
Thanks in advance :)

@andrefarzat
Copy link
Collaborator

Hello @ranineha003 , you first need to install plotly.js (in case you haven't: npm install plotly.js --save) and then in the angular.json file (in the root folder of the project) and add the "node_modules/plotly.js/dist/plotly.min.js" to the "scripts" json path.

Here a complete angular.json file example: https://pastebin.com/igqp69j7 (see line 28)

@ranineha003
Copy link
Author

ranineha003 commented Apr 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants