crubier / react-graph-vis

A react component to render nice graphs using vis.js
http://crubier.github.io/react-graph-vis/
MIT License
946 stars 170 forks source link

How to fix node position? #116

Open number-00 opened 3 years ago

number-00 commented 3 years ago

I tried setting x, y values for the nodes, and set it as fixed. But I noticed that it still renders at different position on each reload.

number-00 commented 3 years ago

nodes: [ { id: 1, label: '1', title: '1 tootip text', fixed: { x: true, y: true, }, group: 'myGroup', physics: false, size: 32, x: -35, y: -152, },

VakarisZ commented 1 year ago

@number-00 Try setting randomSeed , this is what helped me

dannykennedy commented 1 year ago

This doesn't seem to work for me either, and randomSeed didn't help...

dannykennedy commented 1 year ago

OK, I was using physics: true, and the physics were just pulling things out of place 🤦‍♂️