react-plotly.js icon indicating copy to clipboard operation
react-plotly.js copied to clipboard

plotly.js 1.57.0/1.56.0 and react-plotly.js 2.5.0 are not said to be incompatible

Open silviubogan opened this issue 5 years ago • 4 comments

This combination of plotly.js and react-plotly.js seems to be unsupported. I might try with other versions in future too. It would be useful to write about this in some file if it is confirmed.

TypeError Cannot read property 'document' of undefined

Code Sandbox

https://codesandbox.io/s/nervous-elbakyan-x3i8e?file=/src/App.js

Screenshot

image

Updates

plotly.js 1.56.0 has a similar error: image

Thank you.

silviubogan avatar Nov 04 '20 17:11 silviubogan

I am not sure if the title of this issue is correct. After posting the above, I tested locally in another separate project and the versions look compatible. Maybe it is an issue in CodeSandbox, or in other places too. I don't know.

silviubogan avatar Nov 05 '20 11:11 silviubogan

Are things working in this same environment with previous versions i.e. 1.55 ? I don't think we broke anything here.

nicolaskruchten avatar Nov 05 '20 14:11 nicolaskruchten

It is not working with 1.55 in CodeSandbox: https://codesandbox.io/s/trusting-jepsen-j4cvi?file=/package.json.

image

silviubogan avatar Dec 29 '20 13:12 silviubogan

plotly.js npm page says to install it with "plotly.js-dist". The readme here says to install "plotly.js"

I tried upgrading to 2.51 and plotly.js-dist to 1.58.4 but all sorts of errors appear. Adding plotly.js as another dependency gave me "d3 is not defined".

bishonen avatar Jan 06 '21 17:01 bishonen