且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用于图表操作的Javascript库

更新时间:2023-02-25 11:54:42

您可以尝试

JSNetworkX
将NetworkX图库的一个端口转换为JavaScript

http://felix-kling.de/JSNetworkX/


Is there any suggested javascript alternative(s) to pythons pygraph or NetworkX? It should be noted that visualization is not necessary (even prefered not to have this).

The library should be able to parse a format capable of retaining labeling and attributes on nodes and edges (DOT, GraphML?). It should support operations such as:

  • Listing nodes and edges.
  • Given a node, the edges which point in/out to/from it.
  • Given a node or edge, return the attached attributes.
  • Given two nodes that are connected, determine the most complete path. When running this operation a predicate function should be provided to determine if a node should be included in the search or not.

To put it in context, the web browser based application will traverse the graph from a pre-determined start node. Each node holds an attribute 'userValue' which is compared against conditions (rules?) held as attributes on the nodes out-edges. For the traversal to continue the edge condition must evaluate to true against 'userValue'. The graph will always contain a predetermined start and end (or goal) node.

You could try

JSNetworkX A port of the NetworkX graph library to JavaScript

http://felix-kling.de/JSNetworkX/