Carlos Souza
Carlos Souza

Reputation: 436

Highcharts annotation outside plot area not working

Annotations are not properly shown outside plot area. I've tried overflow: 'none' and crop: false as mentioned in Highcharts documentation, but it doesn't work.

Here's a failing example: https://codesandbox.io/s/highcharts-vue-demo-forked-njxk9?file=/src/components/Chart.vue

Can anyone help?

Upvotes: 0

Views: 218

Answers (2)

Callum
Callum

Reputation: 115

This bug has now been resolved since v9.3.0 by setting annotations.crop to false to disable cropping.

Highcharts.chart('container', {
  
  annotations: [{
    crop: false,
    labelOptions: {
      ...
    },
  }],

}

https://jsfiddle.net/BlackLabel/p2xh5kba/2/

Upvotes: 0

ppotaczek
ppotaczek

Reputation: 39139

This is a Highcharts regression bug and it is reported here: https://github.com/highcharts/highcharts/issues/12897

As a workaround overwrite addClipPaths function:

Highcharts.Annotation.prototype.addClipPaths = function() {};

Live example: http://jsfiddle.net/BlackLabel/g0c71qz5/

Upvotes: 1

Related Questions