<div id="sigma-container"></div>
import { layerBorder } from "@sigma/node-border";
import Graph from "graphology";
import Sigma from "sigma";
import { extremityArrow, layerFill, pathLine, sdfCircle } from "sigma/rendering";
const graph = new Graph();
graph.addNode("a", { x: 0, y: 0, size: 15, color: "#e22653", label: "Alice" });
graph.addNode("b", { x: 100, y: -100, size: 10, color: "#277da1", label: "Bob" });
const container = document.getElementById("sigma-container") as HTMLElement;
const renderer = new Sigma(graph, container, {
{ size: 0.1, color: "#333" },
{ size: 0, color: { attribute: "color" }, fill: true },
extremities: [extremityArrow()],
color: { attribute: "color" },
size: { attribute: "size", defaultValue: 10 },
label: { attribute: "label" },
labelVisibility: "visible",
edges: [{ color: "#ccc", size: 2, head: "arrow" }],