plotly/plotly.js

[FEATURE]: Add modebar button to download figure JSON

Open

#7,917 opened on Jul 6, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (1,846 forks)batch import
P3enhancementfeaturegood first issuegood for agentsize: 1

Repository metrics

Stars
 (15,964 stars)
PR merge metrics
 (Avg merge 35d 19h) (36 merged PRs in 30d)

Description

Hi Plotly team, Could Plotly add a built-in modebar button to download the current figure as Plotly JSON?

Use case: in scientific visualizations, users often generate a plot in a web app, then want to customize it further by editing the underlying figure definition. Vega users can inspect/export a Vega spec and modify it directly; it would be useful to have a similar path for Plotly figures.

Ideally the button would export the current figure as JSON containing data, layout, and optionally config. This can be implemented today with a custom modebar button, but built-in support would standardize the behavior and avoid every project reimplementing it.

Thanks for considering it.

Contributor guide