关系图

描述:当前是关于Echarts图表中的 关系图 示例。
 
            option = {
    title: {
        text: ''
    },
    legendHoverLink: false,
    tooltip: {
        show: false
    },
    animationDurationUpdate: 1500,
    animationEasingUpdate: 'quinticInOut',
    label: {
        normal: {
            show: true,
            textStyle: {
                fontSize: 12
            },
        }
    },
    legend: {
        show: false,
    },
    series: [
        {
            type: 'graph',
            symbolSize: 40,
            roam: false,
            categories: [{
                name: '地区',
                itemStyle: {
                    normal: {
                        color: "#109800",
                    }
                }
            }],
            label: {
                show: true,
                textStyle: {
                    fontSize: 12
                },
                position: 'right'
            },

            data: [{
                name: '景区场馆',
                draggable: false,
                x: 90,
                y: 40
            }, {
                name: '民宿',
                category: 0,
                draggable: false,
                x: 80,
                y: 50
            }, {
                name: '餐饮美食',
                category: 0,
                draggable: false,
                x: 70,
                y: 60
            }, {
                name: '文创产品',
                category: 0,
                draggable: false,
                x: 60,
                y: 70
            }, {
                name: '酒店住宿',
                category: 0,
                draggable: false,
                x: 60,
                y: 80
            }, {
                name: '重点村镇',
                category: 0,
                draggable: false,
                x: 70,
                y: 90
            }, {
                name: '民俗演艺',
                category: 0,
                draggable: false,
                x: 80,
                y: 100
            }, {
                name: '非遗',
                category: 0,
                draggable: false,
                x: 90,
                y: 110
            }],
            links: [{
                source: '景区场馆',
                target: '民宿',
                category: 0,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57'
                }
            }, {
                source: '民宿',
                target: '餐饮美食',
                category: 1,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57'
                }
            }, {
                source: '餐饮美食',
                target: '文创产品',
                category: 1,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57'
                }
            }, {
                source: '文创产品',
                target: '酒店住宿',
                category: 1,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57'
                }
            }, {
                source: '酒店住宿',
                target: '重点村镇',
                category: 1,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57'
                }
            }, {
                source: '重点村镇',
                target: '民俗演艺',
                category: 1,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57'
                }
            }, {
                source: '民俗演艺',
                target: '非遗',
                category: 1,
                value: '地区',
                lineStyle: {
                    width: 1,
                    curveness: 0.2,
                    color: '#FDAB57',
                    label: {
                        show: false
                    }
                }
            }],
            lineStyle: {
                normal: {
                    opacity: 1,
                    width: 1,
                    curveness: 0
                }
            }
        }
    ]
};