我想要使用d3.v3.js,world-110m.json和topojson.v1.js來獲取在IE9中工作的地圖(我也在使用jQuery 10.1因此也被加載)。它在FF和Chrome中運行良好,但是,據我所知,IE 8及以下版本沒有本地SVG支持,因此如果沒有解決方法,則無法支持。D3:在IE9中使用d3.js時出現「無效參數」錯誤
不幸的是,IE9似乎也沒有工作。在IE 9控制檯中出現錯誤:
SCRIPT87:無效的參數。 d3.v3.js,行726字符4
d3_selectionPrototype.insert = function(name, before) {
name = d3_selection_creator(name);
before = d3_selection_selector(before);
return this.select(function() {
return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments));
});
};
726線是「迴歸this.insertBefore」等任何想法是怎麼回事,如何解決?
FWIW:我發現這個錯誤是在d3版本中引入的。 3.2.3(現在是3.3.6)。我就此與Mike Bostock聯繫。他對d3.v3做了輕微的修改,消除了這個錯誤。第777行:return this.insertBefore(name.apply(this,arguments),aheadapply(this,arguments)|| null); – dylanmac