Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to display dynamic data in IE8 #8874

Closed
CSA opened this issue Sep 2, 2018 · 5 comments
Closed

Unable to display dynamic data in IE8 #8874

CSA opened this issue Sep 2, 2018 · 5 comments
Assignees
Labels

Comments

@CSA
Copy link

@CSA CSA commented Sep 2, 2018

Expected behaviour

display dynamic data in IE8

Actual behaviour

unable to display dynamic data in IE8

Live demo with steps to reproduce

I get the archive from official website,in examples\dynamic-update , I import the oldie.js after highcharts.js,but still cann't display dynamic data in IE8.
I noticed that if i invoke addPoint method like "series.addPoint([x, y], true, true);",charts will not be updated,but if i set the third parameter (shift) to false,charts will be updated,but the first point will not be removed.
Thanks!

Product version

Highcharts-6.1.1

Affected browser(s)

IE6,IE8

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Sep 3, 2018

Hi @chen365409389

Thank you for reporting the issue. Does it mean other browsers (e.g. Chrome) works fine? Do you see the same issue in our official demo: https://www.highcharts.com/demo/dynamic-update

@CSA
Copy link
Author

@CSA CSA commented Sep 3, 2018

yes,it works fine in Chrome and IE9, but got issue in old IE browsers(IE6,IE8).
I open the official demo url in IE9, it tips need add oldie.js , so I download the latest archive from https://code.highcharts.com/zips/Highcharts-6.1.2.zip , and got the same issue
Thanks

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Sep 5, 2018

@KacperMadej - could you take a look?

@KacperMadej
Copy link
Contributor

@KacperMadej KacperMadej commented Sep 5, 2018

It's a bug in H.indexOfPolyfill in oldie. The function there is wrongly called or just not as it should be.

As a workaround:

use this code after loading oldie and before creating any charts:

Highcharts.indexOfPolyfill = function (member, fromIndex) {
    var arr = this,
        len,
        i = fromIndex || 0;

    if (arr) {
        len = arr.length;

        for (; i < len; i++) {
            if (arr[i] === member) {
                return i;
            }
        }
    }

    return -1;
};

Internal note:
Resolve this with #8346 too

@KacperMadej KacperMadej self-assigned this Sep 5, 2018
KacperMadej added a commit that referenced this issue Sep 5, 2018
TorsteinHonsi added a commit that referenced this issue Sep 6, 2018
@CSA
Copy link
Author

@CSA CSA commented Sep 7, 2018

It's all good,I use the code in my chart and it works fine,Thanks for your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants