In particular, I would like to legend disable single click events or legend double click events. It seems that this might be achieved by layout[‘legend’][‘uirevision’], but I haven’t been able to get that to work either. I’m working with ScatterGeo traces, and have tried:
Not sure if this is an ideal solution, but one alternative, if you don’t want any legend functionallity, is to just create an annotation. This would also have the benefit of increased flexibility since you aren’t just constrained to the trace name for the labels.
Hmm, I don’t actually see a clean way to do this in Dash right now. You’d need custom js that looks for new graphs and calls gd.on('plotly_legendclick', () => false) on them. Sounds ugly and finicky. We have a longstanding issue about this, that just hasn’t bubbled up to the top of the queue https://github.com/plotly/plotly.js/issues/665
Thanks @alexcjohnson, I had been following that github issue. Agreed, the js solution while possible, isn’t exactly trivial to implement. I’ll keep an eye on the github issue, maybe this is something I can contribute to.