-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Custom Partial Bundle - Scatter3d - Not working. #5031
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
Comments
SOLVEDNeeded to add ify
Still isnt 100 percent okay, paper background isn't showing up. |
Background is now showing, I just needed to include import Plotly from "plotly.js/lib/core";
import Scatter3d from "plotly.js/lib/scatter3d"
import Mesh3d from "plotly.js/lib/mesh3d"
import createPlotlyComponent from "react-plotly.js/factory";
Plotly.register([Scatter3d, Mesh3d]);
const CustomPlotly = createPlotlyComponent(Plotly);
export default CustomPlotly; |
Thanks very much @mithi for the updates. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to load my own custom partial bundle, because I only need the Scatter3d. I was not successful. There might be a bug which might be related to issue: -#4883
Here's the code sandbox link and screenshot.
I found these related issues to help me with this
Here's the sandbox of my actual project which is working fine currently because i'm using the plotly partial bundle (OK)
Here's the sandbox where I'm using a custom partial bundle (NOT OK)
This is the only difference between the two:
Console log errors when running on local
On Chrome

Version 84.0.4147.89 (Official Build) (64-bit)
, MacBook Pro (Retina, 13-inch, Mid 2014)MacOs Catalina 10.15.5
Also happens on firefox 78.0.2 (64-bit)
Additional info # 1
I experimented with https://github.com/mithi/plotly-webpack
and was somewhat successful (I wasn't able to load the paper background)...
I found out that I can reproduce my plot having only a gzipped bundle size of
~410kb
. This is significantly lower than when I useplotly.js-gl3d-dist-min
- The latter has a gzipped bundle size of~450kb
Additional info # 2
Importing all the requirements here https://github.com/plotly/plotly.js/blob/master/lib/index-gl3d.js
produces the same error discussed above ... while Commenting out
Plotly.register([Scatter3d]);
Will remove the error and produce the followingI also saw this issue which might be related #4989
But i don't know how to fix it in my case.
Any help is appreciated! Thanks!
The text was updated successfully, but these errors were encountered: