This page demonstrates the simplest possible embedding of an ONA graph. The entire visualization is driven by a single JavaScript object (the VizSpec below). No server-side rendering, no composer, no saved files — just a spec and the engine.
tokens.js, lenses.js, colors.js, lab.js).
<div> with
x-data="onaViz(null)" and x-init="loadInlineSpec(SPEC)".
Pass null to skip the API VizSpec fetch; loadInlineSpec() injects your object directly.
The engine still fetches graph data from the API (api.php?action=load&dataset=…).
"dataset": "SBM_INNOVATION_small" — synthetic org network (100 nodes · 565 edges). Replace with any available dataset ID."node_color": "department" — each department gets a distinct color"node_size": "none" — all nodes rendered at uniform size"active_edge_layers": ["communication"] — only communication edges shown"shell.topbar": false — no navigation bar (clean embed mode)"shell.panels": [] — no sidebar panels (no legend, metrics, or compute)SPEC constant in the page source.
No backend change required.
x-data="onaViz(null)" initializes the engine component.
x-init="loadInlineSpec(SPEC)" injects the spec defined above.
The child div[x-ref="sigmaContainer"] is where Sigma renders the WebGL canvas.
<script> tags,
define your own SPEC constant, and paste the mount <div>.
That's it. The VizSpec is the only thing you need to customize.