Black Lives Matter. Please consider donating to Black Girls Code today.

Disable legend click functionality (hiding traces)

Is it possible to disable traces hiding when legend elements are clicked?


Unfortunately, this is not possible at the moment.

But we are planning on adding this feature. Please subscribe to for the latest development info.

On another note, is it possible to just hide the mode bar/ hover tool as well as the export link at the bottom of the chart?

As of v1.37 (and specifically you can disable hiding traces by legend click using the plotly_legendclick event:

gd.on('plotly_legendclick',function() { return false; })

Is this a general convention used for Plotly events or is it only for certain ones like plotly_legendclick & plotly_legenddoubleclick?