-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
目录结构: |
stroke: '#5F95FF', | ||
lineWidth: 1, | ||
}, | ||
palette: defaultPalette, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
色板配置直接合并到里面,不分开定义了
There was a problem hiding this comment.
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(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
调整下逻辑,把 fetch 套在外层,graph 实例化和事件响应等到放到里面去
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有这个属性
图模式匹配:
![屏幕录制2024-05-08 17 13 21](https://private-user-images.githubusercontent.com/102511291/328830123-7df638dc-be83-4de4-98a8-152d27d6fb99.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwMzI2MjAsIm5iZiI6MTcxODAzMjMyMCwicGF0aCI6Ii8xMDI1MTEyOTEvMzI4ODMwMTIzLTdkZjYzOGRjLWJlODMtNGRlNC05OGE4LTE1MmQyN2Q2ZmI5OS5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxMFQxNTEyMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04OTY1YjMxYTUwZTBhM2U0OGMyZTc2Nzk1MzljY2I4MDVjMjg2YjExN2U2ODU2YmUxYWYzMjU4ZWNjNDllNWE5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.OZ2izzU7ONzRnXhUITSjdQlDqKFkdY_iShrnA6Ei1ak)
最短路径:
![屏幕录制2024-05-08 17 50 34](https://private-user-images.githubusercontent.com/102511291/328842676-85ae38e1-a739-4c12-b39f-c314d2001ece.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwMzI2MjAsIm5iZiI6MTcxODAzMjMyMCwicGF0aCI6Ii8xMDI1MTEyOTEvMzI4ODQyNjc2LTg1YWUzOGUxLWE3MzktNGMxMi1iMzlmLWMzMTRkMjAwMWVjZS5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxMFQxNTEyMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hOGY0YjY5MjY4MjMwOTg5YzgzMjM2NTcxMjFjYzI2ODZhZDc1YjY5YmQyMTUzN2QxM2FlODZmOTNiODE2ZjEyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.u1-ZrTq15Fbu-YAjudEah8J-LRwxyuTGO5vflwGid9c)
LP 自动聚类:
![屏幕录制2024-05-09 11 25 54](https://private-user-images.githubusercontent.com/102511291/329116317-3998cfad-0fd3-4976-a113-d00211d4bbff.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwMzI2MjAsIm5iZiI6MTcxODAzMjMyMCwicGF0aCI6Ii8xMDI1MTEyOTEvMzI5MTE2MzE3LTM5OThjZmFkLTBmZDMtNDk3Ni1hMTEzLWQwMDIxMWQ0YmJmZi5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxMFQxNTEyMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYmE1NDVjNWZlNTFlYjhlYzIxZTkxZTVkMmE5NjhmNzZhNGQ2OTdlZDgwZjVhNGU4N2I4MGQxYzI2MWZiMWVhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3MpULF1FBuZiVo3yZasiz1MFuJH8SzHyjaxYT3Ab2y8)
LOUVAIN 自动聚类:
![屏幕录制2024-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