Editable Mode - Preventing shape and annotation dragging?

Hello!

I have been googling for a while on this subject and cannot seem to find any answers.
I have my plotly graph set to ‘editable’, which allows my users to move the legend around, which is great. But, I have a lot of shapes and annotations on the graph in question and when the mode is active, users can move all of these things around and rename annotations, which I don’t want them to do.

One ‘ugly’ workaround I have is to save the state of the drawings and on the relayout event, I just reset everything back to the way it was. This doesn’t present the best user experience.

Is it possible to conditionally have editable turned on for certain features but disabled for others?

Or is there another way that I have not stumbled across that somebody could share?

Please and thank you!

Hey @dritchie welcome to the forums.

You can try setting the editable parameter of the annotations to false.

1 Like

I appreciate the quick response, @AIMPED!

While this didn’t specifically help me, it did lead me to where the answer is, so I’m very grateful!

It seems that there is another parameter in config just under ‘editable’ called ‘edits’ and there are several parameters under that which can be set to turn off specific edit functionality.

Thank you again!

1 Like