echarts 关系图力引导布局

echarts 关系图力引导布局如何实现每个位置随机移动,单个放大效果。

option = {
    // 图表标题
    title: {
        show:true,//显示策略,默认值true,可选为:true(显示) | false(隐藏)
    },
    backgroundColor: '#fff',
    tooltip: {},
    animationDurationUpdate: function(idx) {
        // 越往后的数据延迟越大
        return idx * 100;
    },
    animationEasingUpdate: 'bounceIn',
    color: ['#fff', '#fff', '#fff'],
    series: [{
        type: 'graph',
        layout: 'force',
        force: {
            repulsion: 500,
            edgeLength: 10
        },
        roam: true,
        label: {
            normal: {
                show: true
            }
        },
        data: [{
            "name": "新冠肺炎愈后一般6个月内不会再得",
            "value": 2373,
            "symbolSize": 48,
            "draggable": true,
            "itemStyle": {
                "normal": {
                    "shadowBlur": 100,
                    "shadowColor": colorList[0],
                    "color": colorList[0]
                }
            }
        }]
    }]
}

image.png

阅读 2.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题