blacklabel / annotations

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

Annotation does not work on pie charts #80

Open mandalmanav opened 6 years ago

mandalmanav commented 6 years ago

Annotations are not working for pie chart.

screen shot 2018-08-21 at 1 26 23 pm
pawelfus commented 6 years ago

Hi @mandalmanav

Thanks for reporting, you are right: build-in buttons with annotations don't work on a pie chart. The same for pyramid or funnel charts. Build-in buttons generate annotations according to xAxis and yAxis, but these series don't support axes.

mandalmanav commented 6 years ago

Is there any way to do this. ?

pawelfus commented 6 years ago

You need to create your own buttons and create annotations to render on absolute positions. Problem with absolute positions (in comparison to xAxis/yAxis related positions) is responsiveness. If chart doesn't have fixed width, then annotations won't reflow to fit container.

Maybe you can create chart with empty axes (but with random extremes, e.g. 0-100) and hide all axis elements (like labels)? That should resolve the issue.