Skip to content
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

Can't make custom bundle with strict scattergl trace #6496

Closed
CallumNZ opened this issue Feb 20, 2023 · 5 comments
Closed

Can't make custom bundle with strict scattergl trace #6496

CallumNZ opened this issue Feb 20, 2023 · 5 comments
Labels
feature something new

Comments

@CallumNZ
Copy link
Contributor

I want to make a custom bundle that just includes the scattergl graph from the strict bundle. I tried the following:

npm i plotly.js
cd node_modules/plotly.js
npm i
npm run custom-bundle -- --traces scatter,scattergl-strict --transforms none

Error: scattergl-strict is not a valid trace!

I saw the name scattergl-strict here, so thought it might work.
Not sure if it's the wrong command, a bug, or not a feature.
Thanks.

@alexcjohnson
Copy link
Collaborator

@archmoj is there a way to use the strict gl traces in custom bundles?

@archmoj
Copy link
Contributor

archmoj commented Mar 2, 2023

I don't see such an option in https://github.com/plotly/plotly.js/blob/master/tasks/custom_bundle.js
But that's something we could add.

@archmoj archmoj added the feature something new label Mar 2, 2023
@archmoj
Copy link
Contributor

archmoj commented Mar 2, 2023

@CallumNZ if you are interested to submit a PR, here you could possibly declare strict in args:

// parse arguments

something like:

    var strict = inputBoolean(args.strict, false);

then once enabled point to index-strict.js here:

index: path.join(constants.pathToLib, 'index-' + out + '.js')

         strict: strict,
         index: path.join(constants.pathToLib, 'index-' (strict ? 'strict-' : '') + out + '.js')

@CallumNZ
Copy link
Contributor Author

CallumNZ commented Mar 9, 2023

Thanks @archmoj, I will give it a go!

@CallumNZ
Copy link
Contributor Author

CallumNZ commented Apr 3, 2024

Done

@CallumNZ CallumNZ closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

3 participants