1、普通关系图
option = {
title: {
text: '数据图谱'
},
tooltip: {
trigger: 'item',
formatter: '{a} : {b}'// 如果用索引关联关系,悬浮窗会写索引。
},
legend : { //=========圖表控件
show : true,
data : [
{
name : '数据项',
icon : 'circle'
}, {
name : '目录',
icon : 'roundRect'
} ]
},
series : [
{
name : "数据关系",
radius: '70%',
itemStyle : {
normal : {
label : {
fontSize:14,
// color:'yellow'
}
}
},
type: 'graph',
layout: 'force',//图表类型
force: {
repulsion: 700
},
symbolSize: 15,
roam: true,
label: {
normal: {
show: true,
position: 'right',
}
},
edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [2, 10],
edgeLabel: {
normal: {
textStyle: {
fontSize: 20
}
}
},
lineStyle: {
normal: {//指向线
opacity: 0.9,
width: 1,
color:'#333333'
}
},
data: [// 列出所有项,不能有重复