简体   繁体   English

D3 IE8 兼容性?

[英]D3 IE8 Compatibility?

Is there any way to make D3 compatible with IE8?有没有办法让D3兼容IE8? Many of the posts here and in the documentation suggested using aight.此处和文档中的许多帖子都建议使用 aight。 https://github.com/shawnbot/aight/blob/master/aight.js https://github.com/shawnbot/aight/blob/master/aight.js

However, I added the lines/file mentioned to my html, but this still doesn't work in ie8.但是,我将提到的行/文件添加到我的 html 中,但这在 ie8 中仍然不起作用。 http://matthewpiatetsky.com/jsdemo.html http://matthewpiatetsky.com/jsdemo.html

Does anyone know if there are any additional steps I need to take?有谁知道我是否需要采取任何其他步骤?

Perhaps use r2d3?也许使用r2d3? Not sure how to do that, but will try to figure out不知道该怎么做,但会尝试弄清楚

D3 uses SVGs to graph and since IE8 does not support SVG it won't work.I would give R2D3 a try, it shims SVG via Raphael to be compatible with D3. D3 使用 SVG 来绘制图形,因为 IE8 不支持 SVG,所以它不会工作。我会尝试 R2D3,它通过 Raphael 填充 SVG 以与 D3 兼容。 There are some limitations as some functionality won't be available.由于某些功能将不可用,因此存在一些限制。 Look at https://github.com/mhemesath/r2d3/ for more details查看https://github.com/mhemesath/r2d3/了解更多详情

aight.js 为我工作,只需要注意在 d3.js 之前导入它

Many good demos of R2D3 , and Aight demos now exist.许多优秀的R2D3的演示,并Aight演示现在存在。

I think that re-coding your question to demo it in one of these libraries is out-of-scope of SE, but hope you find the links useful.我认为重新编码您的问题以在这些库之一中演示它超出了 SE 的范围,但希望您发现这些链接有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM