blacklabel / annotations

Annotations plugin for Highstock by Black Label
http://blacklabel.github.io/annotations/
Other
22 stars 16 forks source link

Add a call to select annotation #50

Closed priikone closed 8 years ago

priikone commented 9 years ago

It would be nice to be able to add new annotation with addAnnotation and have it already selected and/or have a call to select a specific annotation.

pawelfus commented 9 years ago

Good idea! For now you can use this snippet:

annotation.events.storeAnnotation(e, annotation, chart);
annotation.events.select(e, annotation, false);

First one stores references to the annotation (for drag&drop etc), and second one renders dashed border around the annotation.

Simple demo: http://jsfiddle.net/N6GR9/90/

priikone commented 9 years ago

Great, thanks, I shall be using that workaround for now.