Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
248 views
in Technique[技术] by (71.8m points)

javascript - Making d3.js compatible with IE8/IE9

I am using a Leaderboard from the following link

http://labs.juiceanalytics.com/leaderboard/index.html#2a65db98c6f451b7f071b630694bc350

In this leaderboard d3.js and d3.csv.js are being used. This leaderboard is working fine for me in all the browsers except IE8 and IE9. For these browsers some error in scriptting is there with d3.js. I have searched it out well on internet but i didn't find any promising solution to make it work with IE8 or IE9. The error which it is showing is that "Object can't find the .map() method", which is used in d3.js. Glad if somebody can help me out in this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The author of d3 recommends using aight HTML5 shim/polyfill bundle for compatibility.

The .map method in question is part of EcmaScript5 - and therefore not available in IE8.

Mozilla provides a function you can drop in to get this functionality. Good luck with IE8!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...