【发布时间】:2018-04-06 06:40:38
【问题描述】:
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;
}
}
});
【问题讨论】:
-
欢迎来到 StackOverflow!请阅读有关how to ask a good question 和how to give a reproducible example 的信息。这将使其他人更容易帮助您。
标签: zoomcharts