✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Custom Modebar Button in Dash

Is it possible to create custom modebar buttons for graphs in Dash?

For example, what is the equivalent Dash implementation of this: https://codepen.io/ifland/pen/RLEogK

1 Like

This is not possible right now. You can see how the Graph component is calling the plotly.js methods here: https://github.com/plotly/dash-core-components/blob/b7f776f4aa15be3dae160a4df7b011a4eaa7f425/src/components/Graph.react.js#L66-L78

The rest of the modebar config options are outlined in this forum post: Is it possible to hide the floating toolbar?

I am also interested in custom toolbar button, or more precisely, in changing the behaviour of the default “save to png” button, to override height/width so that produced images are high-dpi and can be inserted into slides: https://codepen.io/volodymyrk/pen/EbqLYK
However, javascript complains about missing “click” binding. I guess we have to wait for dash support of this plotly.js feature.


I’m also interested in this. @chriddyp is it available now?

1 Like

Is it possible to use an extern JS file using plotly associated to Dash application??