@sigma/node-square
v3.0.0-beta.3
Published
A node program that renders nodes as squares for sigma.js
Downloads
301
Readme
Sigma.js - Node square renderer
This package contains a node square renderer for sigma.js, as well as a proper
How to use
Within your application that uses sigma.js, you can use @sigma/node-square
as following:
import { NodeSquareProgram } from "@sigma/node-square";
const graph = new Graph();
graph.addNode("some-node", {
x: 0,
y: 0,
size: 10,
type: "square",
label: "Some node",
color: "blue",
});
const sigma = new Sigma(graph, container, {
nodeProgramClasses: {
square: NodeSquareProgram,
},
});
Please check the related Storybook for more advanced examples.