antvis / antvis/layout

我在webworker中使用ForceAtlas2Layout布局,如何启用迭代方式执行

Open
#288 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
276
Forks
60
PR merge metrics
No merged PRs in 30d

Description

import { ForceAtlas2Layout } from '@antv/layout';

const data = {
nodes,
edges,
}
const layout = new ForceAtlas2Layout({
width,
height,
nodeSize: 60,
preventOverlap: true,
kr: 10,
barnesHut: true,
mode: 'linlog'
});
await layout.execute(data);
我在自己在webworker中这样使用ForceAtlas2Layout布局,但是计算出来的node节点位置有很多是重叠在一起的。规律是凡事节点的degree为1的都重叠在了一起。是为什么?

第二,我期望能够启用迭代模式来执行,但文档中对于如何使用迭代方式执行说的不够详尽,期望能出一个例子详细说明一下使用方式。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.