请帮助我使 d3.js 与 ie8/ie9 兼容。它在 Firefox 和 chrome 中运行良好。它在 IE8 中给了我以下错误:
对象不支持 d3.v3.min.js 在此行中的此属性或方法:
Qa=["y","z","a","f","p","n","µ","m","","k","M","G", "T","P","E","Z","Y"].map(yt);
请帮助我使 d3.js 与 ie8/ie9 兼容。它在 Firefox 和 chrome 中运行良好。它在 IE8 中给了我以下错误:
对象不支持 d3.v3.min.js 在此行中的此属性或方法:
Qa=["y","z","a","f","p","n","µ","m","","k","M","G", "T","P","E","Z","Y"].map(yt);
这是因为 d3.js 文件中有 utf-8 字符。
看到这个问题: https ://github.com/mbostock/d3/issues/1195
修复:
<!DOCTYPE html>
<meta charset="utf-8">
或者
<script charset="utf-8" src="d3.js"></script>