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;
}
}
});发布于 2018-04-11 03:36:27
这个问题已经在zoomcharts论坛上得到了回答:
https://forum.zoomcharts.com/t/want-single-link-connection-even-there-are-multiple-links/2072/6
基本上,您可以使用以下四种方法之一:
multiLinkProcessor方法合并链接linkFilter省略某些链接linkStyle方法应用特定链接样式dataFunction方法对其进行预处理。https://stackoverflow.com/questions/49686878
复制相似问题