Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(site): add algorithm/gaddi demo #5711

Merged
merged 8 commits into from
May 9, 2024
Merged

feat(site): add algorithm/gaddi demo #5711

merged 8 commits into from
May 9, 2024

Conversation

Whf0403
Copy link
Contributor

@Whf0403 Whf0403 commented May 8, 2024

图模式匹配:
屏幕录制2024-05-08 17 13 21

最短路径:
屏幕录制2024-05-08 17 50 34

LP 自动聚类:
屏幕录制2024-05-09 11 25 54

LOUVAIN 自动聚类:
屏幕录制2024-05-09 11 35 26

@Aarebecca
Copy link
Contributor

目录结构:examples/algorithm/pattern-matching
数据可以使用这个地址:https://assets.antv.antgroup.com/g6/gaddi.json

stroke: '#5F95FF',
lineWidth: 1,
},
palette: defaultPalette,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

色板配置直接合并到里面,不分开定义了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有分开定义呀,我看节点和边用的色板配置都一样,就提出来了个公共的配置

data = _data;
graph.setData(data);
graph.render();
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

调整下逻辑,把 fetch 套在外层,graph 实例化和事件响应等到放到里面去

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已调整

container: 'container',
data,
width,
height,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以不用传宽高,会自适应的

data,
width,
height,
linkCenter: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有这个属性

@Aarebecca Aarebecca changed the title feat: add algorithm/gaddi demo feat(site): add algorithm/gaddi demo May 9, 2024
@Aarebecca Aarebecca merged commit 07474e0 into antvis:v5 May 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants