How to editable only annotation, and other event values

I want to process when changing annotation, but I want to get index or id (customization parameter).
index is included in the key property as shown below, but can not get index only?

If you change the annotation of plot, the relayout.event object looks like this:

annotations [1] .text: "Annotation C"

need:

annotations [1] .text: "Annotation C",
annotations.index: 1

or

annotations [1] .text: "Annotation C",
annotation: { ...data } // id in data 
/*
    {
      x: 2,
      y: 3,
      id: 1
      text: "Annotation A"
    }
*/

Both id and index aren’t valid attributes in annotations items. So you won’t be able change them reliably using relayout unfortunately.

1 Like

@etienne
I’ll get out of this keyName with power technique. Thanks.