我看到zoomcharts在他们最新的更新(1.5.1)中提出了很酷的功能,但我相信它有一些bug…
我不能悬停在中间链接在两个节点之间的多个链接的情况下。我只能将鼠标悬停在第一个和最后一个链接
如果你只是复制粘贴下面的代码,你可以自己测试它…
<script>
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;
}}
});
</script>
此问题已在1.8版中解决。
在它发布之前,您还可以使用夜间构建:https://cdn.zoomcharts-cloud.com/1/nightly/zoomcharts.js