You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 😸
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 :)
The text was updated successfully, but these errors were encountered:
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.
Hi @dre2004,
I added mentioned link in my angular JSON file(plotly is installed) but
still the issue persists.
Error:Cannot read property 'document' of undefined.
Just FYI, I am using es2015 for complier option. As mentioned earlier want
to use es6 in the project.
Thanks & Regards
Neha Rani Singh
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
thecompilerOptions.target
property to"es5"
might solve the issue. Or usingPlotlyViaCDNModule
orPlotlyViaWindowModule
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 :)
The text was updated successfully, but these errors were encountered: