echarts3 graph java_echarts3绘制拓扑图

本文展示了如何利用echarts3的graph图表组件,结合Java来绘制人物关系的拓扑图。配置中详细定义了节点、链接的颜色、样式和布局,实现了动态效果,并且通过设置不同节点类别来区分事件和人物。
摘要由CSDN通过智能技术生成

效果图:

bfd0bc95ba6b

image.png

配置:

var option = {

title: {

text: '人物关系拓扑图',

show: true,

textStyle: {

color: '#fff',

fontWeight: 'normal'

},

padding: [10, 0, 10, -90],

left: '50%'

},

tooltip: {},

animationDuration: 1,

animationDurationUpdate: 1500,

animationEasingUpdate: 'quinticInOut',

label: {

normal: {

show: true,

textStyle: {

fontSize: 12

},

}

},

legend: {

x: "center",

show: false,

data: ["事件", "人物"]

},

series: [

{

type: 'graph',

layout: 'force',

force: {

repulsion: 1000,

gravity: 0.01

},

symbolSize: 45,

focusNodeAdjacency: true,

roam: 'scale',

categories: [{

name: '事件',

itemStyle: {

normal: {

color: "#fff",

}

}

}, {

name: '人物',

itemStyle: {

normal: {

color: "#fff",

}

}

}],

label: {

normal: {

show: true,

<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值