且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

vis.js分层布局中的级别排序

更新时间:2023-01-30 11:52:29

我建议您尝试启用物理学,以理清交叉的边缘等.

I suggest your try enabling physics, which will sort out the edges crossing, etc.

但是,在分层布局中,***通过捕获如下所示的'stabilizationIterationsDone'事件来禁用引擎,使其在第一次迭代后失效:

However, in hierarchical layout, it's a good idea to disable the engine once it's done the first iterations by catching the 'stabilizationIterationsDone' event as follows:

network.on("stabilizationIterationsDone", function(){
  network.setOptions( { physics: false } );
});