Skip to content

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

Merged
thomasjpfan merged 2 commits into
scikit-learn:mainfrom
glemaitre:is/30279
Nov 21, 2024
Merged

thomasjpfan merged 2 commits into
scikit-learn:mainfrom
glemaitre:is/30279

Conversation

@glemaitre

Copy link
Copy Markdown
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.

@github-actions

github-actions Bot commented Nov 18, 2024 •

Copy link
Copy Markdown

✔️ Linting Passed

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

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

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
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