Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Sigma is a JavaScript library dedicated to graph drawing, mainly developed by @jacomyal and @Yomguithereal.
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).
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.
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
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.
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.
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.
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
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.
FAQs
A JavaScript library aimed at visualizing graphs of thousands of nodes and edges.
We found that sigma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.