Skip to content
fkling edited this page Jul 11, 2012 · 10 revisions

JSNetworkX is a port of NetworkX, a popular graph library for Python, to JavaScript.

JSNetworkX allows you to build, process and analyze graphs in JavaScript. It can be used together with D3.js in the browser to create interactive graph visualizations.

Resources

Installing

You can download the latest version of JSNetworkX here:

or get the latest version and the source code:

Development

The following libraries are used by JSNetworkX:

The Closure Compiler is used to minimize and optimize the code.

The development for JSNetworkX has just started, the rough roadmap is as follows:

  • Port unit tests to Jasmine (ongoing)
  • Port base classes (done)
  • Implement renderer with D3 (done, but subject to change)
  • Port algorithms module

Notes

The code is scattered with using bracket notation to access properties (foo['bar']) instead of dot notation (foo.bad). This is ugly, I know. But it is necessary to make the code work well with the Closure Compiler in advanced mode. This mode drastically reduces the file size.

Build instructions

To build the library on your own you will need ant. ant compile will download all necessary dependencies (Closure library and compiler) and compile the files.

You can run test either on the uncompiled or compiled code (SpecRunner.html and SpecRunner_compiled.htm respectively). To run the compiled test, you have to build a special test version with ant test_compile, which just adds some helper functions and creates an more readable version of the compiled code.

Clone this wiki locally