Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.min.js"></script>
</head>
<body>
  <div id="mynetwork" style="width: 400px; height: 800px;"></div>
</body>
</html>
 
const paths = [undefined, 5, 0, 7, 0, 4, 3, 2]
const nodes = new vis.DataSet(paths.map((path, index) => ({
  id: index,
  label: index
})))
const edges = new vis.DataSet(paths.map((to, from) => ({
  from,
  to
})))
const container = document.getElementById('mynetwork');
const data = {
  nodes: nodes,
  edges: edges
};
const network = new vis.Network(container, data, {});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x