D3.js和Cytoscape.js有什么区别? [英] What is the difference between D3.js and Cytoscape.js?

查看:808
本文介绍了D3.js和Cytoscape.js有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

D3.js和Cytoscape.js有什么区别?

What is the difference between D3.js and Cytoscape.js?

为什么有人会选择Cytoscape而不是D3.js?

Why would someone choose Cytoscape over D3.js?

推荐答案

D3用于图表,主要是静态图形。 Cytoscape.js允许您操作高度可自定义的交互式图形,并且具有与jQuery一样易于使用的API。

D3 is for charts and mostly static graphs. Cytoscape.js lets you manipulate highly-customisable and interactive graphs, and has an API as easy to use as jQuery.

D3用于任意 SVG 。这意味着虽然它可用于制作许多不同的东西,但您必须自己构建渲染器,交互和模型。有时这就是你需要的。 (注意SVG往往无法使用大量SVG元素高效渲染高度复杂的场景,因此请仔细评估应用程序的要求。)

D3 is for arbitrary SVG. This means that although it can be used to make lots of different things, you have to build the renderer, interaction, and model yourself. Sometimes that's what you need. (Note SVG tends not to be able to performantly render highly complex scenes with lots of SVG elements, so evaluate your app's requirements carefully.)

Cytoscape.js是一个专注于库的库仅仅是图论(网络)。它有一个内置的,高性能的渲染器,它有手势和事件,它有一个开箱即用的复杂图形模型等。因为它更集中,Cytoscape.js让你用更少的代码做你的图表更多 - 但是当然,你不能用它来做条形图或点图表。

Cytoscape.js is a library focussed just on graph theory (networks). It has a builtin, performant renderer, it has gestures and events, it has a sophisticated graph model out of the box, etc. Because it's more focussed, Cytoscape.js lets you do much more with your graphs with less code -- but of course, you can't use it for things like bar charts or point charts.

如果你想要一个简单的网站图表,D3很棒。如果你想用一个严肃的图形组件构建一个应用程序,而不必重新发明轮子,Cytoscape.js很棒。

If you want a simple chart for a website, D3 is great. If you want to build an app with a serious graph component without having to reinvent the wheel, Cytoscape.js is great.

这篇关于D3.js和Cytoscape.js有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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