Mehhhh.
Mehhhh.

Reputation: 213

Add Edges Dynamically to VisJS graph

I would like to dynamically create/update a VisJS graph. I was able to add the nodes, but if I try to add the edges the grapth diappears.

I already tried the solutions listed in this stackoverflow question, none of them worked: Add Edge Dynamically visjs

Code: https://jsfiddle.net/Janiaje/tb1smgo2/5/

Code fails at this (52) line:

this.edges.add(this.edgesArray)

Upvotes: 0

Views: 299

Answers (1)

Max Sinev
Max Sinev

Reputation: 6034

Large third-party objects or libraries should be initialized without Vue reactivity because it can be a cause of unexpected behavior or performance issues. And this is your case, if you just comment network in Vue data function(to make network field be non-reactive) the app will work.

I also recommend to do that for your vis DataSets.

Upvotes: 1

Related Questions