-
Notifications
You must be signed in to change notification settings - Fork 98
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
d3.selection.sort() doesn't work in IE8 #1
Comments
This is doesn't seem to be an In IE8 D3 fails to override the native array's sort function so when you call This is because in IE D3 builds a selection prototype array with all the extra and overridden methods and then loops through its enumerable keys and copies them to each particular selection. "sort" doesn't show up so it doesn't get copied. |
Aha! Great catch, thank you. Should we force IE8 to make the shimmed |
I'm not sure what can be done from aight's side, to be honest. How could you force IE8 to show an overridden array's "sort" in an for...in loop? |
Well, we could start monkey patching d3 in aight (probably in a d3-specific build), and just brute-force set |
That's a nice angle to the problem. The function is hidden away in a closure, tho. If you want to take a look we added, to bypass the problem,
... to a monkey-patched version of D3; right after this line https://github.com/mbostock/d3/blob/v2.10.3/d3.v2.js#L2588 |
Validate item() method of CSSStyleDeclaration
I'm closing this because D3 v4 probably does things differently, and users have no doubt found their own workarounds. |
But
Array.prototype.sort()
does... Curious.The text was updated successfully, but these errors were encountered: