plotly / plotly/plotly.js

enable updating the config of a plot without changing other parameters

Open
#6,394 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We can change the layout of an existing plot with Plotly.relayout, change the data with Plotly.react, but how to change the config of a plot without changing the other parameters?

Example:

// happens when clicking on a button
var config = element.config;    // problem: this doesn't exist!   <-- how to get the current config state of the plot?
config["staticPlot"] = true;  // let's add a configuration parameter
Plotly.react(element.id, element.data, element.layout, config)

How to get element.config in the same way element.layout and element.data exist?

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 reading the Plotly.relayout and Plotly.react entry points referenced in the issue, then trace how an existing plot exposes its data, layout, and configuration state. The work is done when a plot's current config can be obtained and updated without changing its other parameters, with the behavior covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.