Guest User

Untitled

a guest
Dec 12th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. showGraph() {
  2. this.hierarchialGraph.nodes = [
  3. {
  4. id: '1',
  5. label: '1',
  6. position: 'x1'
  7. }
  8. ....
  9. ];
  10.  
  11. this.hierarchialGraph.links = [
  12. {
  13. source: '1',
  14. target: '2',
  15. label: '1'
  16. }
  17. ....
  18. ];
  19. }
  20.  
  21. getNeighborNode(string) {
  22. for (const i of this.hierarchialGraph.links) {
  23. if (string === this.hierarchialGraph.links[i].source) {
  24. ...
  25. }
  26. }
  27. }
Add Comment
Please, Sign In to add comment