vis.js is a dynamic, browser-based visualization library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
424 B

  1. // Network from `basicUsage` example
  2. // create an array with nodes
  3. var nodes = [
  4. {id: 1, label: 'Node 1'},
  5. {id: 2, label: 'Node 2'},
  6. {id: 3, label: 'Node 3'},
  7. {id: 4, label: 'Node 4'},
  8. {id: 5, label: 'Node 5'}
  9. ];
  10. // create an array with edges
  11. var edges = [
  12. {from: 1, to: 3},
  13. {from: 1, to: 2},
  14. {from: 2, to: 4},
  15. {from: 2, to: 5},
  16. {from: 3, to: 3}
  17. ];
  18. var options = {};