javascript - Want single link connection even there are Multiple links javascript NetChart
问题描述
I have a problem but can someone provide the example code, how to use multilinkProcessor for example I have the given data.
Want single link connection even there are Multiple links
var data = {
"nodes": [{
"id": "n1",
"loaded": true,
"style": {
"label": "Node1"
}
}, {
"id": "n2",
"loaded": true,
"style": {
"label": "Node2"
}
}],
"links": [{
"id": "l1",
"from": "n1",
"to": "n2",
"style": {
"fillColor": "red",
"toDecoration": "arrow"
}
}, {
"id": "l11",
"from": "n1",
"to": "n2",
"style": {
"fillColor": "red",
"toDecoration": "arrow"
}
}, {
"id": "l111",
"from": "n1",
"to": "n2",
"style": {
"fillColor": "red",
"toDecoration": "arrow"
}
}, {
"id": "l114",
"from": "n1",
"to": "n2",
"style": {
"fillColor": "red",
"toDecoration": "arrow"
}
}]
};
var t = new NetChart({
container: document.getElementById("demo"),
area: {
height: 350
},
data: {
preloaded: data
},
info: {
enabled: true,
linkContentsFunction: function(data, link, callback) {
return link.id;
}
}
});
解决方案
推荐阅读
- django - Django - 使用1-1关系方法创建两个不同的用户配置文件,相同的身份验证
- javascript - 'history'、无限制全局变量和 window.history
- swift - 可以直接使用 Publisher 作为 SwiftUI 中的 @ObjectBinding 属性吗?
- android - Gradle:任务“:app:transformClassesWithMultidexlistForDebug”执行失败
- python - 如何在 python 中使用格式化创建自定义 Kivy 标签类?
- node.js - NodeJS:如何将所有传入的服务器请求记录到 mongodb?
- reactjs - 未捕获的 ReferenceError:未定义进程 - React-Rails
- debugging - 我可以告诉 valgrind 在将来访问特定范围的内存时警告我吗?
- image - 如何在 scikit-learn 中对不同大小和格式的不同图像进行分类?
- python - 如何按名称访问 numpy 数组列?