Skip to content

如何创建立体多层次的关系图 #6660

@ChaunceyWang4

Description

@ChaunceyWang4

One-line summary [问题简述]

我创建了如下的关系图:
default
现在我想在每层加上平行四边形,达到三层的立体效果,如下图效果所示:
202179880
请问关系图里有办法可以添加这个属性吗

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

202179880

ECharts option [ECharts配置项]

option = {
title: {
        text: '服务链路追踪'
    },
    tooltip: {},
    animationDurationUpdate: 1500,
    animationEasingUpdate: 'quinticInOut',
    series : [
        {
            type: 'graph',
            layout: 'none',
            symbolSize:[100,50],
            symbol:'roundRect',
            roam: true,
            label: {
                normal: {
                    show: true,
                    color:'rgb(0,0,0)'
                }
            },
            edgeSymbol: ['none', 'arrow'],
            edgeSymbolSize: 18,

            data: [{
                name: '服务1',
                x: 0,
                y: 100
            }, {
                name: '服务2',
                x: 200,
                y: 100
            }, {
                name: '服务3',
                x: 400,
                y: 100
            }, {
                name: '服务4',
                x: 600,
                y: 100
            },{
                name:'服务5',
                x:200,
                y:300
            },{
                name:'服务6',
                x:400,
                y:300
            },{
                name:'服务7',
                x:100,
                y:500
            },{
                name:'服务8',
                x:300,
                y:500
            },{
                name:'服务9',
                x:500,
                y:500
            }],
            itemStyle:{
                normal:{
                    color:'rgb(200,200,200)'
                }
            },
            // links: [],
            links:[
                {
                source: '服务1',
                target: '服务2'
            }, {
                source: '服务2',
                target: '服务3'
            }, {
                source: '服务3',
                target: '服务4'
            }, {
                source: '服务3',
                target: '服务6'
            }, {
                source: '服务5',
                target: '服务6'
            }, {
                source: '服务7',
                target: '服务8'
            }, {
                source: '服务8',
                target: '服务9'
            }, {
                source: '服务2',
                target: '服务6'
            }, {
                source: '服务6',
                target: '服务8'
            }],
            lineStyle: {
                normal: {
                    opacity: 10,
                    width: 2,
                    curveness: 0,
                }
            }
        }
    ]
}

Other comments [其他信息]

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleInactive for a long time. Will be closed in 7 days.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions