获得d3.js使用raphael.js [英] Getting d3.js to work with raphael.js

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

问题描述

我最近使用d3.js实现了一些数据可视化,我现在试图让这个工作Internet Explorer浏览器版本7及以上。让这个工作的常见建议是将d3.js与raphael.js结合,这是一个跨浏览器图形库。



已经有一些实现的此类图书馆,例如
r2d3.js
d34raphael.js:



我试图理解这些现有的实现是否已经具有d3的数据绑定能力和强制布局的物理实现来实现像这个d3示例那样简单: a href =http://bl.ocks.org/1095795 =noreferrer> http://bl.ocks.org/1095795




  • p> Chrome Frame - 一个实际上在底下使用chrome的浏览器插件,意味着SVG可以正常工作。


  • SVG网站 - 其目的是为所有浏览器带来SVG。它看起来像一个相当大的项目,一个有谷歌的输入。


  • webmonarch.github.com/d34raphael/\"> D34Raphael - 你提到这一个,我再次发现它不工作的开箱。在GitHub上检查项目,在几个月没有任何提交活动,并有一些拉请求尝试获得支持事件绑定所需的.on()的第一次通过。如果它不支持事件,是一个问题给你?


  • R2D3 - 再一次你提到的。我从D3网站拿了Sankey的例子,不得不做一些修改才能使它工作。我不能工作的主要事情(拖动事件,组 - 虽然可以使用一种替代方法)。它花了大约一天的努力,使示例工作在IE8,我相信是在一个可用的状态。 GitHub上的项目也更加活跃,开发者承诺,拉进工作,非常积极的讨论等。这得到我的投票。



I have recently implemented some data visualisation using d3.js, I'm now trying to get this to work for Internet Explorer browser versions 7 and above. The common suggestion to get this to work, is to combine d3.js with raphael.js, which is a cross browser graphics library.

There already seem to be some implementations of such libraries such as r2d3.js : d34raphael.js :

I'm trying to understand if these existing implementation already have d3's capability of data binding and the physics implementation of the force layout to implement something as simple as this d3 example : http://bl.ocks.org/1095795

解决方案

I have been looking into this too and a number of options came up.

  • Chrome Frame - 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.

  • SVG Web - 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.

  • D34Raphael - 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.

  • R2D3 - 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.

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

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