文档库 最新最全的文档下载
当前位置:文档库 › 首页图形

首页图形

myChart.showLoading();
$.getJSON('data/asset/data/npmdepgraph.min10.json', function (json) {
myChart.hideLoading();
myChart.setOption(option = {
title: {
text: 'NPM Dependencies'
},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
series : [
{
coordinateSystem:null,
type: 'graph',
layout: 'force',
// progressiveThreshold: 700,
data: json.nodes.map(function (node) {
return {
// x: node.x,
// y: node.y,
id: node.id,
name: https://www.wendangku.net/doc/3e14017287.html,bel,
itemStyle: {
normal: {
color: node.color
}
}
};
}),
edges: json.edges.map(function (edge) {
return {
source: edge.sourceID,
target: edge.targetID
};
}),
label: {
emphasis: {
position: 'right',
show: true
}
},
roam: true,
focusNodeAdjacency: true,
lineStyle: {
normal: {
width: 2,
curveness: 0.3,
opacity: 0.7
}
}
}
]
}, true);
});

相关文档