Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
react-sigmajs
Advanced tools
React SigmaJS - React.JS flow-typed interface for SigmaJS library - fastest opensource rendering engine for linked graphs.
React-Sigma - React.JS flow-typed interface for Sigma js library - fastest opensource rendering engine for linked graphs. Sigma is a fastest JavaScript library dedicated to graph drawing. It makes easy to publish networks on Web pages, and allows developers to integrate network exploration in rich Web applications.
sitegraph/
README.md
node_modules/
package.json
public/ -- static content
src/ -- sources
types/ -- types for @flow checking
npm install
Please note, distribution includes 'canvas-node' module suitable for running jsdom tests (sigma.js functionality). This package requires some global libraries dependencies to compile, please refer to canvas installation page for setup instructions.
Application is built with flow type checking embedded. But it requires flow-typed installed globally:
npm install -g flow-typed
flow-typed
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
npm run flow
Performs flow type check, highly recommended before starting build. Please note, all application custom types are stored in Component files (props and state descriptions) as well as under /types/ subdir.
Sigma - React.JS flow-typed interface for Sigma js library - fastest opensource rendering engine for linked graphs. Sigma makes easy to publish networks on Web pages, and allows developers to integrate network exploration in rich Web applications.
Sigma is the main component which reserves
<SigmaEnableWebGL/>
<Sigma renderer="webgl" style={{maxWidth:"inherit", height:"400px"}}
settings={{drawEdges:false}}
onOverNode={e => console.log("Mouse over node: " + e.data.node.label)}>
graph={{nodes:["id0", "id1"], edges:[{id:"e0",source:"id0",target:"id1"}]}}>
<RelativeSize initialSize={8} />
</Sigma>
Sigma callback receives Sigma Event with the following structure (see Sigma$Event type under /types/sigma.js):
.data
.captor -- information about event handler, for instance position on the page {clientX, clientY}
.node? -- for node events is sigma node data
.edge? -- for edge events is sigma edge data
All defined Sigma types stored under /types/sigma.js, can be used as a reference for objects and parameters.
Sigma container will mount any child component with sigma instance under props.sigma. This way sigma functionality may be extended indefinitely:
call MyCustomSigma extends React.Component {
constructor(props) {
super(props)
props.sigma.graph.addNode({id:"n3", label:props.label});
}
}
...
return <Sigma>
<MyCustomSigma label="Label">
</Sigma>
Component which initializes asynchronously is supposed to mount its children only after initialized (for example LoadJSON), which makes possible to build sequential composition in the pure JSX without any callbacks or handlers. In the following example RelativeSize will be counted only after loading from arctic.json file.
<Sigma>
<LoadJSON url="/arctic.json">
<RelativeSize initialSize={8}/>
</LoadJSON>
</Sigma>
This project was bootstrapped with Create React App.
Below you will find some information on how to perform common tasks.
You can find the most recent version of this guide here.
FAQs
Lightweight but powerful library for drawing network graphs built on top of SigmaJS
The npm package react-sigmajs receives a total of 2 weekly downloads. As such, react-sigmajs popularity was classified as not popular.
We found that react-sigmajs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.