✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Adding Custom buttons to dcc.Graph modebar

Hi

I’m trying to add new button to the modebar using config options in dcc.Graph. However, the plot is not displayed properly in the web page.

tried looking at the browser console, got this:

Code I’m using:

dcc.Graph(config={'modeBarButtonsToAdd': [{
                             'name': 'test',
                             'icon': 'Plotly.Icons.disk',
                             'title': 'Export Chart Data',
                             'click': 'function(){window.alert();}'
                         }]
                         }, 
...)

Could someone help me with this please? sadly I have no exposure to javascript.

Thanks
BB

Hi @blabberbox,

Could you move this question to the “Dash” forum cateogry (rather than “API/Python”)? Thanks!

-Jon

Sure Jon, I thought it was an issue of exposing the js configs through python. have updated it.

Any headway on this? I’m also trying to add modeBar customization through Python.