[Bug]: D3-force布局webworker不可用,会报错误
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug / 问题描述
在d3force布局中将enableWorker属性设置为true,会报以下错误
具体代码如下:
```js
layout: {
type: 'd3-force',
collide: {
strength: 1,
radius: NODE_SIZE,
},
nodeSize: NODE_SIZE,
link: {
distance: 200,
strength: 0.8,
},
x: {
strength: 0.02,
},
y: {
strength: 0.02,
},
manyBody: {
theta: 0.5,
strength: -600,
},
animation: false,
enableWorker: true,
},
```
enableWorker属性设置为false时渲染显示正常,无报错
### Reproduction link / 复现链接
_No response_
### Steps to Reproduce the Bug or Issue / 重现步骤
_No response_
### Version / 版本
🆕 5.x
### OS / 操作系统
- [ ] macOS
- [x] Windows
- [ ] Linux
- [ ] Others / 其他
### Browser / 浏览器
- [ ] Chrome
- [x] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the d3-force layout configuration with enableWorker set to true in G6 5.x on Windows and Edge, then compare it with the working false setting. Inspect the d3-force worker path and use the reported error image to identify the failure; done means the worker-enabled layout renders without an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3js, typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100