option = { itemStyle: { shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10 }, tooltip: {}, legend: [{ formatter: function(name) { return echarts.format.truncateText(name, 200, '12px', '…'); }, tooltip: { show: true }, selectedMode: 'false', bottom: 20, }], animationDuration: 3000, animationEasingUpdate: 'quinticInOut', series: [{ type: 'graph', layout: 'none', force: { //repulsion: 1000 }, legendHoverLink: true, edgeSymbol: ['circle', 'arrow'], edgeSymbolSize: [2, 15], edgeLabel: { show: false, normal: { show: true, position: 'middle', textStyle: { fontSize: 12 }, formatter: "{c}" } }, itemStyle: { shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10 }, data: [{ name: "公司", value: "100000", symbolSize: 110, draggable: false, fixed: true, x: 50, y: 50, }, { name: "小明", value: "100000", symbolSize: 80, draggable: false, fixed: true, x: 50, y: 35 }, { name: "小明-1", value: "100000", symbolSize: 80, draggable: false, fixed: true, x: 50, y: 35 }, { name: "小明-2", value: "100000", symbolSize: 80, draggable: false, fixed: true, x: 50, y: 35 }], links: [{ source: "小明", value: "投资人", target: "公司" }, { source: "小明", value: "董事长", target: "公司" }, { source: "小明-1", value: "董事长", target: "公司", lineStyle: { normal: { width: 2, curveness: 0.1 } } }, { source: "小明-2", value: "董事长", target: "公司", lineStyle: { normal: { width: 2, curveness: -0.1 } } }], focusNodeAdjacency: true, roam: true, //圆形上面的文字 label: { normal: { position: "inside", show: true, textStyle: { fontSize: 12 } } }, lineStyle: { normal: { opacity: 0.9, width: 2, curveness: 0, color: '#000', } } }] };