1

没有全屏

全屏

每当我使用 Measure (X,Y,XY) 注释并切换到全屏时,在 highcharts 的 StockChart 中,注释不会重排或与比例不一致。

有没有办法纠正它?

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

4

1 回答 1

0

该问题是 Highcharts 中的一个错误,此处报告:https ://github.com/highcharts/highcharts/issues/11174

作为一种解决方法,您可以在redraw事件中更新度量注释:

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

现场演示: https ://jsfiddle.net/BlackLabel/xc6eo0f7/

API 参考: https ://api.highcharts.com/highcharts/chart.events.redraw

于 2019-06-26T13:30:01.307 回答