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

Timescale relies on Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER #4294

Closed
OlduwanSteve opened this issue May 27, 2017 · 4 comments
Closed

Comments

@OlduwanSteve
Copy link
Contributor

The implementation of the 'time' scale relies on Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER which are not available in IE 11 (and probably other IE versions).

This codepen link shows a basic chart with time scale, which displays data in chrome but doesn't show anything on IE 11:

https://codepen.io/anon/pen/GmaRYN

The ES6 definitions (9007199254740991 and -9007199254740991) seem to be sensible fallback values. I'll submit a pull request shortly.

@simonbrunel
Copy link
Member

Does that mean v2.6 doesn't work on IE11?

@etimberg
Copy link
Member

If that's the case we may want to consider a v2.6.1

@OlduwanSteve
Copy link
Contributor Author

I can confirm the time scale feature does not work on IE11 in 2.6, you just get a blank chart:

image

@cr4zyc4t
Copy link

cr4zyc4t commented Jun 9, 2017

Insert these code before init Chart, it will work on IE:
if (Number.MAX_SAFE_INTEGER === undefined) {
Number.MAX_SAFE_INTEGER = 9007199254740991;
}
if (Number.MIN_SAFE_INTEGER === undefined) {
Number.MIN_SAFE_INTEGER = -9007199254740991;
}

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

No branches or pull requests

4 participants