react-graph-vis icon indicating copy to clipboard operation
react-graph-vis copied to clipboard

How to fix node position?

Open number-00 opened this issue 3 years ago • 4 comments

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 avatar May 10 '21 07:05 number-00

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

number-00 avatar May 10 '21 07:05 number-00

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

VakarisZ avatar Dec 14 '22 09:12 VakarisZ

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

dannykennedy avatar Mar 04 '23 19:03 dannykennedy

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

dannykennedy avatar Mar 05 '23 18:03 dannykennedy