Published
Edited
Dec 8, 2021
Insert cell
Insert cell
{
liteLoaded;
yield html`
<canvas id="rete" width="${width}" height='720'></canvas>
`;
var graph = new window.LiteGraph.LGraph();

var canvas = new window.LiteGraph.LGraphCanvas("#rete", graph);

var node_const = window.LiteGraph.createNode("basic/const");
node_const.pos = [200, 200];
graph.add(node_const);
node_const.setValue(4.5);

var node_watch = window.LiteGraph.createNode("basic/watch");
node_watch.pos = [700, 200];
graph.add(node_watch);

node_const.connect(0, node_watch, 0);

graph.start();
}
Insert cell
liteLoaded = require("litegraph.js@0.7.8/build/litegraph.js").catch(
() => window["LiteGraph"]
)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more