blacklabel / annotations

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

Shape scaling #55

Open brian428 opened 8 years ago

brian428 commented 8 years ago

It would be very useful to have an option to scale the shapes drawn via the annotation tools when the zoom level changes. If someone is marking a section of the chart with an annotation, and then they zoom, the shape is now covering an incorrect area on the chart.

aadrian commented 8 years ago

not respecting the zoom it's a bug IMHO. The coordinates should be in the Axis domain, not in the pixel one.

pawelfus commented 8 years ago

Hi, thank you for your feedback!

I think you are right, however I am very cautious with changing behaviour in a minor/patch release. Currently, buttons use only x-y coordinates to render on the chart (any annotation, not only rect-type). Solution for now is to create your own buttons and use shape.units = "value".

I think this change in the buttons logic can be made when we split logic for buttons and annotations core (two separate js-files). I hope that annotations 2.0 will get this.