Skip to content

Add JSON download modebar button - #7990

Open
gokul-debugger wants to merge 2 commits into
plotly:mainfrom
gokul-debugger:feat/download-figure-json-main
Open

Add JSON download modebar button#7990
gokul-debugger wants to merge 2 commits into
plotly:mainfrom
gokul-debugger:feat/download-figure-json-main

Conversation

@gokul-debugger

Copy link
Copy Markdown

What does this PR do?

Adds an opt-in downloadJson modebar button for exporting the current Plotly figure as JSON.

The button can be enabled through:

config: {
    modeBarButtonsToAdd: ['downloadJson']
}

or through layout.modebar.add.

It uses Plotly's existing full-json export pipeline, preserving the established serialization behavior for figure data, layout, config, typed arrays, and version metadata. Download failures are reported through the existing Plotly notifier.

This replaces #7963, which GitHub closed after its base branch was deleted.

Closes #7917

Testing

  • npm run test-jasmine -- modebar --nowatch (103 tests passed)
  • npm run lint
  • npm run typecheck
  • npm run test-syntax
  • npm run schema-typegen-diff-check
  • git diff --check

@gokul-debugger
gokul-debugger marked this pull request as ready for review August 24, 2026 23:16
@camdecoster camdecoster self-assigned this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add modebar button to download figure JSON

2 participants