Skip to content

MAINT resize plotly figure to take right-hand sidebar into account #30297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

glemaitre
Copy link
Member

closes #30279

There an interaction between bootstrap/pydata-sphinx/theme and plotly figure where the width of the figure when loading the page does not take into account the right-hand sidebar during the first page loading. The reason could be due that in the HTML code, the right-hand sidebar comes after the plotly figure.

Here, this is a hack to trigger a figure resizing after the page is loaded. It does the job.

Copy link

github-actions bot commented Nov 18, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: e81649f. Link to the linter CI: here

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Can you trigger the example build for this PR, so we can see the fully rendered example?

@glemaitre
Copy link
Member Author

Done!

@thomasjpfan thomasjpfan added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Nov 21, 2024
@thomasjpfan thomasjpfan added this to the 1.6 milestone Nov 21, 2024
@thomasjpfan thomasjpfan enabled auto-merge (squash) November 21, 2024 21:21
@thomasjpfan thomasjpfan merged commit 3d701a7 into scikit-learn:main Nov 21, 2024
34 checks passed
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Dec 4, 2024
virchan pushed a commit to virchan/scikit-learn that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
To backport PR merged in master that need a backport to a release branch defined based on the milestone.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad plotly figures rendering in the examples gallery
2 participants