sigma.js README

The project's README from github.com/jacomyal/sigma.js. As one markdown file: README.md.

npm version Build Status


Sigma.js

Website | Documentation | Mastodon


Sigma.js is an open-source JavaScript library aimed at visualizing graphs of hundreds of thousands of nodes and edges using WebGL, and built on top of graphology.

Usage

To integrate sigma into your project, follow these simple steps:

  1. Installation: Add sigma and graphology to your project by running the following command:

    npm install sigma graphology
    
  2. Usage: Import sigma into your JavaScript or TypeScript file:

    import Graph from "graphology";
    import Sigma from "sigma";
    

    Then, create a new Sigma instance with your graph data and target container:

    const graph = new Graph();
    graph.addNode("1", { label: "Node 1", x: 0, y: 0, size: 10, color: "blue" });
    graph.addNode("2", { label: "Node 2", x: 1, y: 1, size: 20, color: "red" });
    graph.addEdge("1", "2", { size: 5, color: "purple" });
    
    const sigmaInstance = new Sigma(graph, document.getElementById("container"));
    

Companion packages

Sigma ships as a family of packages living in this monorepo. Install only what you need:

Resources

Local development

To run the website locally:

git clone https://github.com/jacomyal/sigma.js.git
cd sigma.js
npm install
npm run start

This will open the website in your web browser (including all its live examples), which live reloads when you modify the examples or the package sources.

Contributing

You can contribute by submitting issues tickets and proposing pull requests. Make sure that tests and linting pass before submitting any pull request.

You can also browse the related CONTRIBUTING.md guide.

Team and sponsors

Sigma is developed by Alexis Jacomy and Benoît Simard at OuestWare, together with Guillaume Plique from the Sciences Po médialab, who also maintains graphology.

The project was initially supported by Sciences Po médialab through the v1 and v2 development. OuestWare has provided continuous support since, and gdotv actively sponsored the v3 and v4 development. The current website was designed by Robin de Mourat.

Since v4, sigma's development also includes help from LLMs. They are used to draft mechanical code, while the architecture, API design, and core logic remain human-authored. Notably, they have been used for the following features:

Professional support

OuestWare offers professional support, custom development, and consulting around sigma. Reach out at [email protected].

sigma.js (jacomyal/sigma.js)

interactive
Searching Database…

What is this?Sigma.js is an open-source JavaScript library for visualizing graphs of thousands of nodes and edges using WebGL rendering.
Is it a standalone app or a library I add to my own project?It's a library you install into a JavaScript or TypeScript project, built on top of the graphology graph data structure library.
How do I add it to my project?Install sigma and graphology as dependencies, then import sigma and create a new Sigma instance with your graph data and a target DOM container.
Do I need graphology or can I use any graph format?Yes, sigma requires graphology for the underlying graph data structure; you build your graph with graphology and pass it to Sigma.
Is the stable version what I should use, or is there a newer one to watch for?The current version is stable, but a v4 alpha is already available with its own site and branch, so APIs may shift if you move to it.
Does it run in any browser or does it need special hardware?It runs in standard web browsers, relying on WebGL for rendering performance with large graphs.
Can I preview examples before building my own graph?Yes, interactive examples are available in the Storybook, and a full-featured React demo app is hosted at sigmajs.org/demo.
Can I create my own sigma package from a template?Running `npm run createPackage` from the project root copies the packages/template folder and scaffolds a new package with updated config and metadata.
Is sigma.js actively maintained?Yes, it's a monorepo with ongoing CI (build, tests, website workflows) and active development toward a v4 release.
What are similar projects?cytoscape.js, G6, uPlot, cesium, apexcharts.js, plotly.js, charts, pele
Creator
jacomyal
Size
62.2 MB
Stars
12.2K
Age
14y
Commits · 90 Days