求大佬帮忙解决一下我的问题
配置项如下
var uploadedDataURL = "/asset/get/s/data-1499408084503-HJhCUs34b.json";
$.getJSON(uploadedDataURL, function(linedata) {
var data = linedata[0]
var links = linedata[1]
var categories = linedata[2]
option = {
title: {
text: "test1",
top: "top",
left: "center"
},
tooltip: {},
toolbox: {
show: true,
feature: {
dataView: {
show: true,
readOnly: true
},
restore: {
show: true
},
saveAsImage: {
show: true
}
}
},
animationDuration: 1500,
animationEasingUpdate: 'quinticInOut',
series: [{
name: '',
type: 'graph',
layout: 'force',
force: {
//initLayout:'circular'
edgeLength: 50,
repulsion: 50,
gravity: 0.2
},
data: data,
edges: links,
categories: categories,
focusNodeAdjacency: true,
roam: true,
label: {
normal: {
position: 'right',
formatter: '{b}'
}
},
lineStyle: {
normal: {
//color: 'target',
curveness: 0
}
}
}]
};
myChart.setOption(option)
})