Install the package
Use the same published version as this showcase, or review the upstream release notes before updating.
npm install @wieslawsoltes/quikgraphweb@0.2.0This package’s license: MS-PL. Retain upstream and bundled third-party notices when redistributing.
Mount your first view
Import graph structures from the root package. Call defineQuikGraphViewer() explicitly before attaching
<div class="toolbar"><label>From <select id="from"><option>A</option><option>B</option><option>C</option><option>D</option></select></label><label>To <select id="to"><option>H</option><option>G</option><option>F</option><option>E</option></select></label><button id="solve">Find path</button><output id="distance"></output></div><quikgraph-viewer id="graph" class="stage" style="display:block"></quikgraph-viewer><p class="hint">Pan, zoom and inspect the graph. Highlighted edges are the actual Dijkstra result.</p>The complete executable source is in the usage guide. Imports shown here are intended for a bundler or a browser import map; bare npm imports do not resolve in ordinary HTML by themselves.
Own the lifetime
Dispose event subscriptions owned by your integration. Load optional Graphviz and MSAGL engines only when needed.
The playground replaces its entire isolated frame on each run. In your application, use the framework’s unmount or disposal hook instead. Do not dispose a shared model while another view still owns it.
Read the lifecycle guide →Know the contract
Source repositories can contain work newer than the published package. The showcase uses @wieslawsoltes/quikgraphweb@0.2.0.