Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sigma

Package Overview
Dependencies
Maintainers
2
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sigma

A JavaScript library dedicated to graph drawing.

  • 2.0.0-beta14
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Build Status

Sigma v2

Sigma is a JavaScript library dedicated to graph drawing, mainly developed by @jacomyal and @Yomguithereal.

Overview

sigmajs.org website provides a global overview of sigma.js v1.

As of version v2, sigma focuses on the management of graph display: layout, rendering, interaction... The graph model is managed in a separate library called graphology, which is packed with convenience methods to manage graph data structures.

A set of demo examples contain various use-cases that might help you understand how to use sigma v2 (read further below).

Status

Sigma.js v2 is a major refactoring and is currently in version alpha. The stable version is v1.2.x. Although not yet finalized and official, v2 is already in use in production in some organizations.

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 complex example can be found in the demo folder. It is the showcase of sigma.js used in the website, to show how to use sigma.js in a full-featured web application.

Code insights

This section presents some keys on how to read sigma.js sourcecode. It describes some choices we've made that could not be properly explained in code comments or the code itself.

Why graphology

The previous versions of sigma.js had their own data model. The most obvious issue was that we had to rewrite all algorithms and import/export features for each new version. Also, now, with node.js more and more popular, having a graph model with algorithm implementations available without the rendering part was very useful.

Rendering

The previous versions of sigma.js were canvas first, and we decided this version will be focused on WebGL, with more than 97% of users having access to a proper WebGL browser. The nodes and edges labels are still rendered in canvas, since we never should display too much at a time.

So, sigma has

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.

Keywords

FAQs

Package last updated on 14 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc