blob: 786e0ec0cf091a2599e81c31b8931a12b0132097 [file] [log] [blame]
myChart.showLoading();
$.get(ROOT_PATH + '/data/asset/data/webkit-dep.json', function (webkitDep) {
myChart.hideLoading();
option = {
legend: {
data: ['HTMLElement', 'WebGL', 'SVG', 'CSS', 'Other']
},
series: [{
type: 'graph',
layout: 'force',
animation: false,
label: {
position: 'right',
formatter: '{b}'
},
draggable: true,
data: webkitDep.nodes.map(function (node, idx) {
node.id = idx;
return node;
}),
categories: webkitDep.categories,
force: {
edgeLength: 5,
repulsion: 20,
gravity: 0.2
},
edges: webkitDep.links
}]
};
myChart.setOption(option);
});