这个图的方向不是预期的角度,现在需要序号9项目朝正上方,关系图配置中并没有起始角度设置,不知道该怎么做。
配置项如下
option = {
"toolbox": {
"feature": {
"saveAsImage": {}
}
},
"tooltip": {
"formatter": "{b}"
},
"series": {
"type": "graph",
"layout": "circular",
"symbolSize": 50,
"label": {
"normal": {
"show": true,
"offset": [
0, -5
]
}
},
"focusNodeAdjacency": true,
"roam": true,
"data": [{
"name": "1\n完美型"
}, {
"name": "2\n给予型"
}, {
"name": "3\n实干型"
}, {
"name": "4\n浪漫型"
}, {
"name": "5\n观察型"
}, {
"name": "6\n忠诚型"
}, {
"name": "7\n享乐型"
}, {
"name": "8\n保护型"
}, {
"name": "9\n和平型",
"itemStyle": {
"normal": {
"color": "#f5994e"
}
}
}],
"edgeSymbol": [
"none",
"arrow"
],
"lineStyle": {
"normal": {
"width": 2
}
},
"links": [{
"source": "1\n完美型",
"target": "7\n享乐型"
}, {
"source": "2\n给予型",
"target": "4\n浪漫型"
}, {
"source": "3\n实干型",
"target": "6\n忠诚型"
}, {
"source": "4\n浪漫型",
"target": "1\n完美型"
}, {
"source": "5\n观察型",
"target": "8\n保护型"
}, {
"source": "6\n忠诚型",
"target": "9\n和平型",
"label": {
"normal": {
"show": true,
"formatter": "人格瓦解或受压,趋于负向"
}
},
"lineStyle": {
"normal": {
"color": "#c05050",
"opacity": 1
}
}
}, {
"source": "7\n享乐型",
"target": "5\n观察型"
}, {
"source": "8\n保护型",
"target": "2\n给予型"
}, {
"source": "9\n和平型",
"target": "3\n实干型",
"label": {
"normal": {
"show": true,
"formatter": "人格提升或放松,趋于正向"
}
},
"lineStyle": {
"normal": {
"color": "#ffb980",
"opacity": 1
}
}
}]
}
}