Skip to content

jacomyal/sigma.js

 
 

Repository files navigation

Build Status


Sigma.js

Website | Documentation | Mastodon


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

Note: This branch tracks sigma v4, currently published as 4.0.0-alpha.x. The stable v3 release is on the main branch.

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

  • GitHub Project: The source code and collaborative development efforts for Sigma.js are hosted on GitHub.
  • Website: The official website, v4.sigmajs.org, showcases the library's capabilities.
  • Documentation: A detailed documentation is available at v4.sigmajs.org/docs. It provides extensive guides, interactive examples, and API references for users.

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 contact@ouestware.com.

About

A JavaScript library aimed at visualizing graphs of thousands of nodes and edges

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors