1

I've found a problem with IE11. When multiple charts was rendered, IE11 throw some "out of stack space" errors.

This is the JSFiddle with the code.

After some tests I think the problem is in "highcharts-ng" plugin in this function (row 103):

    this.$doCheck = function () {
            if (!detector(ctrl.config, prevConfig)) {
            prevConfig = angular.merge({}, ctrl.config);
            mergedConfig = getMergedOptions($element, ctrl.config, seriesId);

            //Remove any unlinked objects before adding
            this.removeUnlinkedObjects(mergedConfig);

            //Allows dynamic adding Axes
            this.addAnyNewAxes(mergedConfig.yAxis, ctrl.chart, false);
            this.addAnyNewAxes(mergedConfig.xAxis, ctrl.chart, true);

            //Allows dynamic adding of series
            if (mergedConfig.series) {
                // Add any new series
                angular.forEach(ctrl.config.series, function (s) {
                    if (!ctrl.chart.get(s.id)) {
                        ctrl.chart.addSeries(s);
                    }
                });
            }
            ctrl.chart.update(mergedConfig, true);
        }
    };

To avoid the problem i've modified the function adding

    var is_ie = navigator.userAgent.indexOf("MSIE ") > -1 || navigator.userAgent.indexOf("Trident/") > -1;
    if ((is_ie) || (ctrl.disableChangeDetection === false)) {
        return;
    }

after the first row.

Is possible to fix the problem avoiding my workaround?

Valerio
  • 23
  • 3
  • The wrapper which you are using is not an official Highcharts product. Please try to reproduce your case using the official Highcharts angular wrapper https://github.com/highcharts/highcharts-angular and let me know if the problem will still exist. – Sebastian Wędzel Jan 24 '20 at 08:18
  • I know this isn't the official product but I have not found any other wrappers. The wrapper you suggested me is for Angular and not AngularJS. – Valerio Jan 27 '20 at 09:10
  • Could you reproduce the problem without the unofficial wrapper (highcharts-ng)? If so, please share the demo. If the problem exists only while using the wrapper the good idea would be to create an issue in its Github repo: https://github.com/pablojim/highcharts-ng – Kamil Kulig Jan 27 '20 at 11:46
  • I think the problem is in the unofficial wrapper. With my workaround (bypass $doCheck function), it works. – Valerio Jan 27 '20 at 11:51

0 Answers0