I’ll preface this by warning I am both a js and plotly beginner so apologies if this is obvious but my search so far has been fruitless.
As per the title I am attempting to require(“plotly.js-dist”) from a typescript source inside of nw.js. I can create a new scatter plot with newPlot but the styling seems to be off (bad layout, no hover effects, no mouse dragging). If I load plotly with a script tag from my index.html everything seems to work fine, however this does not seem to be the Node.js way and it also seems wrong to be putting a hard-coded path to a file in an npm package.
I have a feeling that ‘required’ plotly cannot find the elements, as newPlot(‘myDiv’… does not work whereas newPlot(document.getElementById(‘myDiv’)… does bring up a plot.
I am currently using:
npm package email@example.com
nw.js version 0.54.0