使 d3.js 兼容 IE8/IE9 [英] Making d3.js compatible with IE8/IE9

查看:38
本文介绍了使 d3.js 兼容 IE8/IE9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下链接中的排行榜

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

在这个排行榜中使用了 d3.js 和 d3.csv.js.这个排行榜在除 IE8 和 IE9 之外的所有浏览器中对我来说都很好.对于这些浏览器,d3.js 存在一些脚本错误.我已经在互联网上很好地搜索了它,但我没有找到任何有希望的解决方案来使它与 IE8 或 IE9 一起工作.它显示的错误是对象找不到 .map() 方法",它在 d3.js 中使用.很高兴有人能帮我解决这个问题.

d3的作者推荐使用aight HTML5 shim/polyfill 包的兼容性.

有问题的 .map 方法是 EcmaScript5 的一部分 - 因此 在 IE8 中不可用.

Mozilla 提供 一个你可以放入的函数来获得这个功能.祝 IE8 好运!

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.

解决方案

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!

这篇关于使 d3.js 兼容 IE8/IE9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆