<div id="sigma-container"></div>
import Graph from "graphology";
import Sigma from "sigma";
import { layerFill, sdfCircle, sdfDiamond, sdfSquare, sdfTriangle } from "sigma/rendering";
import { DEFAULT_STYLES } from "sigma/types";
const container = document.getElementById("sigma-container") as HTMLElement;
const graph = new Graph();
const SHAPES = ["circle", "square", "triangle", "diamond"];
const COLORS = ["#e22653", "#0055ff", "#33cc33", "#ff9900"];
// Create a grid of nodes showing each shape at different sizes
for (let row = 0; row < SHAPES.length; row++) {
const shape = SHAPES[row];
const color = COLORS[row];
for (let col = 0; col < 4; col++) {
const size = 10 + col * 8;
graph.addNode(`${shape}-${col}`, {
label: col === 0 ? shape : "",
new Sigma(graph, container, {
shapes: [sdfCircle(), sdfSquare(), sdfTriangle(), sdfDiamond()],
shape: { attribute: "shape" },