Skip to content

Share chart button#7802

Open
emilykl wants to merge 17 commits into
masterfrom
upload-to-cloud-proto
Open

Share chart button#7802
emilykl wants to merge 17 commits into
masterfrom
upload-to-cloud-proto

Conversation

@emilykl

@emilykl emilykl commented May 14, 2026

Copy link
Copy Markdown
Contributor

@emilykl emilykl force-pushed the upload-to-cloud-proto branch from a487ce9 to 100da7b Compare May 14, 2026 17:16
@emilykl emilykl changed the title draft Share chart button May 20, 2026
@marthacryan marthacryan marked this pull request as ready for review May 28, 2026 20:38
@marthacryan marthacryan marked this pull request as draft May 28, 2026 20:40
@marthacryan marthacryan self-assigned this May 28, 2026
Comment thread src/components/modebar/cloud_confirm.js Outdated
Comment thread src/plot_api/plot_config.js Outdated
Comment thread src/plots/plots.js Outdated
Comment thread src/plots/plots.js Outdated
@marthacryan marthacryan marked this pull request as ready for review June 11, 2026 02:33
Comment thread src/components/modebar/cloud_confirm.js Outdated
Comment thread src/plots/plots.js
Comment on lines 204 to 205
plots.sendDataToCloud = function(gd) {
var baseUrl = (window.PLOTLYENV || {}).BASE_URL || gd._context.plotlyServerURL;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to pass in baseUrl / serverUrl as an argument, so that we don't have to duplicate this (window.PLOTLYENV || {}).BASE_URL || gd._context.plotlyServerURL logic

Comment thread src/plots/plots.js
.style('display', 'none');
// Build the request body: the chart JSON plus the plotly.js version used to
// generate it, so Cloud can host the chart with a compatible plotly.js version.
var chart = plots.graphJson(gd, false, 'keepdata', 'object');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heads-up so we both remember in the future: The mode argument was removed by #7829 (merged into v4.0), so when v4.0 is merged into main, this line should be updated to

var chart = plots.graphJson(gd, false, 'object');

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.

3 participants