- Notifications
You must be signed in to change notification settings - Fork1.6k
A JavaScript library aimed at visualizing graphs of thousands of nodes and edges
License
jacomyal/sigma.js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Website |Documentation |Storybook |Mastodon
Sigma.js is an open-source JavaScript library aimed at visualizing graphs of thousands of nodes and edges using WebGL, mainly developed by@jacomyal and@Yomguithereal, and built on top ofgraphology.
To integrate sigma into your project, follow these simple steps:
Installation: Add
sigmaandgraphologyto your project by running the following command:npm install sigma graphology
Usage: Import sigma into your JavaScript or TypeScript file:
importGraphfrom"graphology";importSigmafrom"sigma";
Then, create a new
Sigmainstance with your graph data and target container:constgraph=newGraph();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"});constsigmaInstance=newSigma(graph,document.getElementById("container"));
To run theStorybook locally:
git clone git@github.com:jacomyal/sigma.js.gitcd sigma.jsnpm installnpm run startThis will open the Storybook in your web browser, which live reloads when you modify the stories or the package sources.
- GitHub Project: The source code and collaborative development efforts for Sigma.js are hosted onGitHub.
- Website: The official website,sigmajs.org, kindly designed byRobin de Mourat from theSciences-Po médialab team, showcases the library's capabilities.
- Documentation: A detailed documentation, built withDocusaurus, is available atsigmajs.org/docs. It provides extensive guides and API references for users.
- Storybook: Interactive examples can be found atsigmajs.org/storybook.
- Demo: A comprehensive demo, available atsigmajs.org/demo, features a full-featured React-based web application utilizing Sigma.js.
You can contribute by submittingissues tickets and proposingpull requests. Make sure that tests and linting pass before submitting any pull request.
You can also browse the related documentationhere.
Runnpm run createPackage from the project root. It will:
- Ask you the new package name
- Copy the
packages/templatefolder - Update the new package
package.jsonentries (name, description, exports) - Update various other files (buildable packages list in
tsconfig.json, Preconstruct compatible packages list inpackage.json...)
About
A JavaScript library aimed at visualizing graphs of thousands of nodes and edges
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.