plotly / plotly/plotly.js

Ability to make points or bar sections editable (ideally with drag and drop)

Open
#7,410 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Something like this:
Image

Similar to what is possible with shapes when editable=True is set in the config: https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L47

Changing the position of the point (or bar section) should:

  • modify the underlying traces
  • trigger an event like restyle or relayout
  • be restricted based on the current state of the graph. In the example of the screenshot, it should only be possible that the bar region is moved to "China" or "Canada" and their respective x positions, since those are the available values. Similarly, the y position would be determined by the current "height" of the bar the region is moved to.

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 with the editable-shapes configuration in src/plot_api/plot_config.js and compare its behavior with the requested point and bar-section editing. Define how position changes update underlying traces, trigger restyle or relayout events, and respect the graph's available categorical values and bar heights. Done means these interactions work with the stated restrictions.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.