sigma
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    Build Status

    Sigma.js

    Sigma.js is an open-source JavaScript library aimed at visualizing graphs of thousands of nodes and edges, mainly developed by @jacomyal and @Yomguithereal.

    Overview

    Architecture

    Since version v2, sigma.js focuses on the management of graph display: rendering, interaction... The graph model is managed in a separate library called graphology, which is packed with convenience methods to manage graph data structures, and a lot of satellite libraries to handle various graph-related problems (metrics, community detection, layout algorithms...).

    Graphology website offers a list of these libraries. Most of them can help you solve problems in your sigma.js based web applications.

    Rendering

    Sigma.js uses WebGL to render graphs. This makes it good at rendering medium to larger graphs in web pages (thousands of nodes and edges or more). It is also possible to customize rendering, but it is harder than it would be with SVG or Canvas based solutions.

    Installation

    You can install sigma (and graphology which is required for sigma to work) in your JavaScript or TypeScript project using npm:

    npm install graphology sigma

    Examples

    The examples folder contains a series of self-contained TypeScript projects that you can either browse and edit on CodeSandbox or install locally likewise:

    git clone git@github.com:jacomyal/sigma.js.git
    cd sigma.js
    npm install
    cd examples
    npm start --example=load-gexf-file # Change this to the desired example

    List of available examples

    Also, a more realistic sigma.js based web application is available in the demo folder. It aims to show a real-world usecase, and is the main showcase of sigma.js website.

    Website

    The current website is a simple manually crafted single-page web site. It is located in the website folder. It also showcases the React.js based demo available in the demo folder in an iframe. The website itself does not need any build step, though the demo does.

    Development

    To start a dev server that will reload the webpage when the code is updated, run:

    npm run website:watch

    Then, open localhost:8080 in your browser. When any file in the website directory is saved (including the demo bundle), the page will be reloaded.

    Build

    To simply build the demo and copy the bundle in the website folder, just run:

    npm run website:all

    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 documentation here.

    Install

    npm i sigma

    DownloadsWeekly Downloads

    2,468

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    571 kB

    Total Files

    90

    Last publish

    Collaborators

    • yomguithereal
    • jacomyal