plotly / plotly/plotly.js

[BUG]: please provide an unbundled version of stackgl_modules

Open
#7,654 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Description

I use a very minimal configuration consisting of just a few modules:

import * as Plotly from "plotly.js/lib/core.js";
import * as scatter from "plotly.js/lib/scatter";
import * as surface from "plotly.js/lib/surface";
Plotly.register([scatter, surface]);

the via node_modules/plotly.js/src/traces/surface/convert.js, line 3, this pulls in stackgl_modules:

var createSurface = require('../../../stackgl_modules').gl_surface3d;

As a result, the whole stackgl_modules/index.js file is pulled in, even though only a few parts are needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting src/traces/surface/convert.js and the referenced stackgl_modules/index.js to trace why importing the surface trace pulls in the whole module. Determine the scope of an unbundled stackgl_modules interface that preserves the minimal Plotly registration example, then verify that only the requested surface dependencies are included.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.