var datas=[],links=[],categories=[]; datas=[ { name:'echart', category:'0', symbolSize: 42 },{ name:'e', category:'1', symbolSize: 26 }, { name:'c', category:'1', symbolSize: 28 },{ name:'h', category:'1', symbolSize: 24 },{ name:'a', category:'1', symbolSize: 20 },{ name:'r', category:'1', symbolSize: 16 },{ name:'t', category:'1', symbolSize: 16 },{ name:'s', category:'2', symbolSize: 16 },/*{ name:'t', category:'3', symbolSize: 14 },{ name:'abc', category:'4', symbolSize: 14 }*/ ]; links=[ { source: 'echart', target: 'e' },{ source: 'echart', target: 'c' },{ source: 'echart', target: 'h' },{ source: 'echart', target: 'a' },{ source: 'echart', target: 'r' },{ source: 'echart', target: 't' },{ source: 't', target: 's' },/*{ source: 's', target: 't' },{ source: 't', target: 'abc' }*/ ]; categories=[ { name:'0' },{ name:'1' },{ name:'2' },{ name:'3' },{ name:'4' } ] option = { animationDuration: 500, animationEasingUpdate: 'quinticInOut', series: [{ name: '区域经济主题视图', type: 'graph', layout: 'force', force: { initLayout: 'circular', repulsion: 320, gravity:0.2 }, draggable: "true", data:datas, links:links, categories:categories, focusNodeAdjacency: true, roam: true, label: { normal: { show: true, position: 'top', } }, lineStyle: { normal: { color: 'source', curveness: 0.2, type: "solid" } } }] };