1

without full screen

on full screen

In StockChart of highcharts whenever I use Measure (X,Y,XY) annotation and switch to full screen, the annotation does not reflow or is not consistent with the scale.

Is there a way to correct that?

https://www.highcharts.com/stock/demo/stock-tools-gui

Sunny
  • 235
  • 4
  • 17
  • Hi @Pratyush Garg, That problem is a bug in Highcharts, I reported it here: https://github.com/highcharts/highcharts/issues/11174. I will try to provide you some workaround soon. – ppotaczek Jun 26 '19 at 08:53

1 Answers1

0

That problem is a bug in Highcharts and it is reported here: https://github.com/highcharts/highcharts/issues/11174

As a workaround, you can update measure annotations in redraw event:

chart: {
    events: {
        redraw: function() {
            this.annotations.forEach(function(annotation) {
                if (annotation.options.type === 'measure') {
                    annotation.update();
                }
            });
        }
    }
}

Live demo: https://jsfiddle.net/BlackLabel/xc6eo0f7/

API Reference: https://api.highcharts.com/highcharts/chart.events.redraw

ppotaczek
  • 36,341
  • 2
  • 14
  • 24