但最近在Internet Explorer 8中也需要支持它们.
但到目前为止,我无法在IE8中显示这个html.
这些是D3中使用的标签:
<svg> <path> <g> <line> <circle> <rect>
在过去6个小时中,我已经浏览了很多材料和问题,包括:
“Display inline SVG in IE8”,自2012年10月起就有this answer:
I have been looking into this too and a number of options came up.
07002 – A browser plug-in that actually uses chrome underneath,meaning SVG just works. This is great if you’re able to deploy plugins to the browser,for a real commercial environment however this may not be possible.
07003 – The aim is it bring SVG to all browsers. It looks like a fairly large project,one that’s had Google’s input. This doesn’t however work out of the Box with D3 though I don’t know much about the issues.
07004 – You’ve mentioned this one,I found again it doesn’t work out of the Box. Check the project out on GitHub,there hasn’t been any commit activity in months and there’s some pull requests “first pass on trying to get support for .on() required for event binding”. If it doesn’t support events,is that an issue to you? I’d generally keep away from this one.
07005 – Again another one you mentioned. I took the Sankey example from the D3 website and had to make a few changes to get it working. The main things I couldn’t get working (Drag Events,Groups – though can use an alternative). It took about a day of effort to get the example working in IE8 and I believe is in a useable state. The project on GitHub is also much more active,the developer is committing,pulling work in and is very active on discussions etc. This gets my vote.
也:
wikipedia.org/wiki/Scalable_Vector_Graphics
但是使用客户端插件的解决方案是不可接受的,到目前为止,我看不到在IE8中显示svg.
所以解决方案是找到一些其他方法来渲染向量图.
我认为别人有同样的问题
编辑:
无论哪种方式,在我之后遇到同样问题的人至少会有一些集中的材料,并且会意识到,在IE8上显示svg并没有简单/真实的解决方案,更好地花费时间从现有的代码重写/调整为非-svg版本
编辑:
经过一些测试,我会说它值得尝试通过R2D3的例子,看看它是否可能简化/执行IE8中的代码
编辑:
在分别测试不同元素的过程中,似乎出现了一些r2d3问题
最常见的是Invalid argument和Object doesn’t support this property or method
因为我不习惯为IE8开发,有一些有用的提示,我发现: