Vis.js does not work properly with Vue?

Posted 2 years ago by Filip_Zdravkovic

Hi,

I have started an "issue" about this here: https://github.com/almende/vis/issues/2567 and I have also started a new thread on the Vue forum (but no response): https://forum.vuejs.org/t/vis-js-does-not-work-properly-with-vue-when-adding-a-new-edge-all-nodes-become-red-and-edges-overlap/5132

It seems that Vis doesn't work properly with Vue, or I am doing something wrong with Vue...

I have created a very simple app using Vue.js & Vis Network. You can take a look at it here: https://jsfiddle.net/Filip_Z/2ewtzh7w/1/

For some reason, when I add a new edge - all nodes become red and every newly added edge will overlap with the existing one:

Image of Vis Graph

On the other side, here is the same version of this app without Vue: https://jsfiddle.net/Filip_Z/63jcj26y/2/

... and there are no problems, everything works fine. There are no errors in the browser console and I cannot figure out why is this happening.

Tooa (almende/vis) wrote:

There was a similar problem with the dataset where all nodes got the title 4 after an update here? **Looks like visjs does not work properly with vue.js** or something is missing on the vue.js side in order to work properly with visjs.

**This issue is really strange.** However, I think it is easier to debug the setData method mentioned in the other issue. Looks like they are related.

Is it possible that Vis & Vue just can't work properly together, or maybe something is wrong with my Vue? I'm asking because I don't know how to debug/solve this, I have no idea what is causing this behavior.

Please sign in or create an account to participate in this conversation.