[英]D3.JS: implementing Force-Directed Graph for my tag data structure
I'm trying to use the Force-Directed Graph in my application. 我正在尝试在应用程序中使用力导向图 。 But I'm really stuck in implementing it with my tags data. 但是我真的很难用我的标签数据来实现它。
My tag data structure is like: 我的标签数据结构如下:
for each Tag{
"name":<The name of the tags>
"friends":<a list of names of other tags that this tag need to be connected with>
}
I noticed in the example links has indexes for source and target nodes. 我在示例链接中注意到,链接具有源节点和目标节点的索引。 But I don't have this with my dynamic data. 但是我的动态数据没有这个功能。
Any idea? 任何想法?
BTW, I'm using AngularJS with D3 and data is in Angular. 顺便说一句,我在D3中使用AngularJS,数据在Angular中。
Thanks!! 谢谢!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.