Skip to content

Opton to remove Plotly modebar #944

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

Open
KertLynx opened this issue Dec 27, 2023 · 1 comment
Open

Opton to remove Plotly modebar #944

KertLynx opened this issue Dec 27, 2023 · 1 comment

Comments

@KertLynx
Copy link

In Jupyter Lab or other IDEs, it is possible to remove Plotly modebar from display by using the following line

fig.show(config = {'displayModeBar: False})

However, I am not able to use this line in py-shiny. If I do, it opens another browser window displaying the plot. Is there an option to pass this config to py-shiny rendering function, so that the the rendered plot does not display plotly modebar?

@cpsievert
Copy link
Collaborator

cpsievert commented Dec 28, 2023

Unfortunately this is a known limitation of FigureWidget, I'd really like to see solution come from plotly.py, likely following the proposal here plotly/plotly.py#1074 (comment)

In the meantime, you can either take advantage of this workaround or add a .plotly .modebar { display: none; } CSS rule to your Shiny app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants