documentation
documentation copied to clipboard
annotation
- [ ] add
clickannotationsto https://plot.ly/javascript/plotlyjs-events/ and mentioncaptureeventsin the example. - [ ] update https://plot.ly/javascript/text-and-annotations/#styling-and-formatting-annotations example
This needs to wait for https://github.com/plotly/plotly.js/issues/1573 to be released, which will fix this event but require the annotation to have the attribute captureevents: true.
In https://plot.ly/javascript/text-and-annotations/#styling-and-formatting-annotations - the last part:
.on('plotly_clickannotation', function(event, data) {
Plotly.relayout('myDiv', 'annotations[' + data.index + ']', 'remove');
});
is supposed to mean that you can click on an annotation and it will disappear. But that doesn't work. You can click on the data point again to get the annotation to disappear, but not on the annotation.
While you're in there, might be good to modernize the relayout calls... to use myPlot instead of 'myDiv' and null instead of 'remove' (which is deprecated)