Graphs
Draw interactive network graph on an html5 canvas
Install / Use
/learn @paulfears/GraphsREADME
Graphs.js
A library for drawing interactive graph theory graphs on an html5 canvas
https://paulfears.github.io/Graphs/ (live version)
Quick Start
To get started link the Graphs.js into your page like this
<script src="Graphs.js"></script>
Then in a seperate Javascript file do this
let graph = new Graph("id of canvas element")
and just like that you have an interactable graph widget, where a user can draw connect and edit nodes
Configuration and useage
Creating nodes
let graph = new Graph("canvasid");
// graph.node(xposition : Number, yposition: Number, radius: Number, "text")
let node1 = graph.node(100, 100, 20, "text")
Creating connections
creating an unweighted biDirectional connection
let node1 = graph.node(100, 100, 25, "node1");
let node2 = graph.node(200, 200, 25, "node2");
node1.connect(node2);
creating a weighted biDirectional connection
let node1 = graph.node(100, 100, 25, "node1");
let node2 = graph.node(200, 200, 25, "node2");
node1.connect(node2, 25) //created a connection with a weight of 25
creating a directional connection
let node1 = graph.node(100, 100, 25, "node1");
let node2 = graph.node(200, 200, 25, "node2");
node1.directional(node2, 15) //created a directional connection with a weight of 15
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
