"Edit in Chart Studio" button has gone missing

Hello,

I have just noticed that the “Edit in Chart Studio” button is missing from all my dashboards. It looked like the following:

Did this get removed in a particular release and I just didn’t notice at the time, or has it gone missing via some other means? My chart toolbar now just looks like this:

image

Cheers,
Rob

1 Like

@robfraz, this was changed a while back. The edit in chart property is default to off, but can be turned on in the config settings of dcc.Graph using showlink:

dcc.Graph(id=id, figure=figure, config=dict(showlink=True))

Also, it is no longer in the modebar. Now it is a hyperlink in the lower right hand corner of the plot.

1 Like

Ah, brilliant. Thank you!

Or, add

dcc.Graph(config=dict(modeBarButtonsToAdd=['sendDataToCloud'])
1 Like

This doesn’t seem to work - it just results in: ‘Error loading dependencies’. It seems that others are having the same issue over here: Config modeBarButtonsToAdd 'zoom2d' throwing "Error loading dependencies" · Issue #282 · plotly/dash · GitHub

This did work (although it was config=dict(showLink=True), with a capital ‘L’). However, it comes with problems with the link text being occluded sometimes, which wasn’t a problem with the mode bar. For example:


Ideally I’d add the button back into the mode bar, but the modeBarButtonsToAdd solution doesn’t work at all.

Cheers,
Rob

Ah, sorry about that, you’re right.

Looking at the config again, dash-core-components/dash_core_components/Graph.py at 84b06f21f1577c26ce6669f6193fcfcea9c30370 · plotly/dash-core-components · GitHub, you should be able to use:

config=dict(showSendToCloud=True)

I just tried this and it does work:

1 Like

Ah, nice. Thanks. I had also just figured out I could explicitly define all buttons like this:

DEFAULT_CHART_CONFIG = {
    'modeBarButtons': [
        [
            'toImage',
            'sendDataToCloud',
            'zoom2d',
            'pan2d',
            'zoomIn2d',
            'zoomOut2d',
            'autoScale2d',
            'resetScale2d',
            'toggleSpikelines',
            'hoverClosestCartesian',
            'hoverCompareCartesian'
        ]
    ]
}

# And then use it with all my graphs as so:
dcc.Graph(id='foo', config=DEFAULT_CHART_CONFIG)
1 Like

Is there anyway to activate the ‘Edit in Chart Studio’ link when saving a figure into a file using:

import plotly    
plotly.offline.plot(figure_or_data=figure,filename=filename)

I am also using plotly.io.write_html… not sure the difference between plotly.offline.plot and plotly.io.write_html. But so far none of the two seem to allow me to add the ‘Edit in Chart Studio’ button to the html file being generated.

Can this be switched on globally with a plotly setting?