Skip to content

[CHORE]: remove scatter trace from custom bundle #8048

Description

@Lexachoc

Quoted from https://github.com/plotly/plotly.js/blob/main/CUSTOM_BUNDLE.md:

Please note that the scatter trace is currently included in all bundles and cannot be removed. This behaviour may change in the future, so we recommend that you explicitly include scatter anyway if you need it in your bundle.

There was previously an attempt to make scatter optional in #5535, but that PR was closed without being merged.

Since plotly.js is relatively large even when using a custom bundle, being able to exclude unused traces such as scatter would help further reduce the bundle size.

I'm not sure how much bundle size reduction this would result in, since scattergl, scatterternary and some other traces reuse parts of the scatter implementation. Still, it seems useful for custom bundles to avoid including trace modules that are not explicitly requested where possible.

Would it be worth to re-consider this optimization?

If scatter still needs to be included for architectural reasons, it may be worth updating the documentation? Since the PR is closed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogchoreTrack maintenance work (dependency bumps, build/CI, internal refactors, docs, etc.)plotly-internalsize: 5taskone-off task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions