I am plotting a graph using the extendtraces function. On certain data plots I would like to add an annotation. Is that possible? How?
Any suggestions on how to accomplish this?
The extendtraces function seems very limited according to the documentation.
Something like this could help you, adjust it to what you need
var newAnnotation = {
x: x,
y: y,
xref: 'x',
yref: 'y',
yanchor: yanchor,
ax: 0,
ay: ay,
bgcolor: color,
borderpad: 3,
arrowcolor: color,
font: {
size:8,
color: 'black'
},
text: textLabel
},
newIndex = (myPlot.layout.annotations || []).length;
Plotly.relayout(myPlot, 'annotations[' + newIndex + ']', newAnnotation)
Thanks for replying.
I need to use extendtraces. My plot is interactive and live. It does not plot all the data at once. Extendtraces doesn’t seem to support extra info when plotting a point.
I hope I’m wrong and someone has a solution.
Any insight there?