-
Notifications
You must be signed in to change notification settings - Fork 6
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
How to specify plotly's config
attribute?
#173
Comments
Unfortunately this is a limitation of the underlying plotly That said, there are CSS workarounds you can do to hide stuff from the modebar. I've done this a few times to hide the modebar completely. If you're curious how to do that, I can get a minimal example for you. |
Thank you for your response @cpsievert I have tried hiding stuff using CSS myself, but couldn't get it to work. A small example would be very helpful! |
Actually, with the latest releases of plotly and shinywidgets, you can now specify a Still not totally ideal (maybe import plotly.express as px
import plotly.graph_objects as go
import shiny.express
from shinywidgets import render_plotly
@render_plotly
def plot():
fig = px.histogram(
px.data.tips(),
x="total_bill",
)
w = go.FigureWidget(fig)
w._config["displayModeBar"] = False
return w |
config
attribute when rendering Plotlyconfig
attribute?
Thanks! Not sure why but your implementation does not work for me using shiny core. This works for me: |
Can you provide a complete example and double-check you have shinywidgets>=0.5 and plotly>=6.0? |
Hi!
Currently, It is impossible to change any configuration options (e.g., adding or removing buttons from the modebar) when rendering a Plotly Figure using shinywidgets. Any chance this can be supported?
The text was updated successfully, but these errors were encountered: