Home

Awesome

ngraph

Ngraph is a set of graph related algorithms. It can be used in a browser or on the server side. This repository is a collection of examples, which show how to use some of them or build your own.

What is available?

At the core of the library is ngraph.graph package, which simply represents a graph data structure.

Interactive renderer

This is set of libraries that use ngraph modules to provide rendering in the browser:

Algorithms

Clusters/Community Detection

Graph metrics

Serialization

Graph layout

When layout in the browser is not feasible (e.g. the graph is too large to achieve decent performance) we can compute layout offline and provide static positions to the browser:

Other

There are plenty modules within ngraph family: this npm search shows most of them

Playground

You can quickly start a new project with core ngraph modules using this template project: https://github.com/anvaka/graph-start

Building your own modules

This repository has multiple examples how to build your own module which suits your needs best:

Video

Here is an introduction video to this library: Browserify Monolith. This library has also appeared in TEDx talk at Stanford: The Beauty I See in Algebra by Margot Gerritsen. It has also appeared in this TEDx talk How can visualizing our personal data empower our health? by Amina Qutub

Why?

I built vivagraph to learn javascript two years ago. I definitely learned a lot and vivagraph itself is a pretty decent graph drawing library.

However vivagraph is built in monolithic way. For example, if I wanted to add new streaming traversal API I could not justify it inside monolithic "graph drawing" library.

Ngraph opens huge possibilities, with each module being available on npm. Now you can pick just what you need and swap out parts which are not relevant to your project.

I'm not abandoning vivagraph by any means. Quite the opposite, this repository is a next step of evolution.

How to run examples locally?

ngraph is powered by npm. All examples require a bundle.js file, which is produced by executing npm start command inside folder with example. Make sure you have all modules installed inside a folder (npm install inside folder with example will download all dependencies).

Looking for alternatives?

I'm trying to put up a list of all known graph drawing libraries. Please find it here

license

MIT