美文网首页
2020-06-11

2020-06-11

作者: ShindouHiro | 来源:发表于2020-06-12 16:46 被阅读0次







option = {

    backgroundColor: '#232528',






    textStyle: {
        color: '#000'
    },
    series: [{
        width: 960,
        type: 'graph',
        tooltip: {
            backgroundColor: 'skyblue',
            //formatter: "{b} <br/>{a} : {c} h "
        },
        layout: 'none',
        symbol: 'diamond',
        symbolSize: 150,
        roam: true,
        itemStyle: {
            normal: {
                color: '#1b9acf'
            }
        },







        label: {
            normal: {
                show: true,
                position: 'inside',
                //offset: [0,-60],//居上 20
                textStyle: {
                    fontSize: 12,
                    color: '#fff',
                    fontWeight: 'BOLD',


                },
                /**/
                formatter: function(para) {
                 
                    if (para.name.substring(0, 1) == '_') {
                        return '';
                    } else {
                        return para.name;
                    }
                }
                /**/
            }
        },


        // edgeSymbolSize: [20, 20], 
        edgeLabel: {
            show: true,

            normal: {


                textStyle: {
                    fontSize: 12,
                    color: '#43A1AC',



                },



            }
        },
        //注意,所有节点的位置都是根据自己设置的x, y坐标来设置的
        data: [{
                x: -400,
                y: 300,
                symbol: 'rect',
                name: '兄弟公司',
                symbolSize: [142, 218],
                itemStyle: {
                    borderColor: '#43A1AC ',
                    color: '#2D3034',
                    borderWidth: 2,
                },
                label: {
                    padding: [-190, 0, 0, 0],
                    color: '#43A1AC',
                    align: 'right',

                },
                value: [{
                        company: '中建五局(湖南)机械施工有限公司'
                    },
                    {
                        company: '中建五局(湖南)机械施工有限公司'
                    },
                    {
                        company: '中建五局(湖南)机械施工有限公司'
                    },
                    {
                        company: '中建五局(湖南)机械施工有限公司'
                    },
                    {
                        company: '中建五局(湖南)机械施工有限公司'
                    },
                ]


            },
            {
                name: '_兄弟公司辅助线',
                x: -600,
                y: 300,
                symbolSize: [1, 1],

            },
            {
                x: -400,
                y: -200,
                symbol: 'rect',
                name: '母公司的其他股东',
                symbolSize: [204, 60],
                itemStyle: {
                    borderColor: '#A15D41',
                    color: '#2D3034',
                    borderWidth: 2,
                },
                label: {
                    padding: [-30, 0, 0, 0],
                    color: '#A15D41',
                },

            },

            {
                x: -600,
                y: 2,
                symbol: 'rect',
                name: '实际控制方',
                symbolSize: [204, 60],
                itemStyle: {
                    borderColor: '#A15D41',
                    color: '#2D3034',
                    borderWidth: 2,
                },
                label: {
                    padding: [-30, 0, 0, 0],
                    color: '#A15D41'
                },
                value: '控制'
            },
            {
                x: -600,
                y: -200,
                symbolSize: [1, 1],
                name: '_实际控制方辅助线'
            },
            {
                x: -200,
                y: 2,
                symbol: 'rect',
                name: '母公司',
                symbolSize: [204, 60],
                itemStyle: {
                    borderColor: '#A15D41',
                    color: '#2D3034',
                    borderWidth: 2,
                },
                label: {
                    padding: [-30, 0, 0, 0],
                    color: '#A15D41'
                }


            },
            {
                x: -200,
                y: -200,
                name: '_母公司辅助线',
                symbolSize: [1, 1],


            },
            {
                name: '中建一局集团建设发展有限公司',
                x: 120,
                y: 0,
                symbol: 'rect',
                symbolSize: [180, 30],
                itemStyle: {
                    color: '#2B4A4D'
                },

            },
            {
                name: '_中建一局集团建设发展有限公司辅助线',
                x: -20,
                y: 0,
                symbolSize: [1, 1],

            },
            {
                name: '子公司',
                x: 400,
                y: 0,
                symbol: 'rect',
                symbolSize: [142, 218],
                itemStyle: {
                    color: '#2D3034',
                    borderColor: '#728A4F',
                    borderWidth: 2,
                },
                label: {
                    padding: [-190, 0, 0, 0],
                    color: '#728A4F'
                }


            },
            {
                name: '_子公司辅助线',
                x: 250,
                y: 0,
                symbolSize: [1, 1],
                itemStyle: {
                    color: '#2D3034',
                    borderColor: '#728A4F',
                    borderWidth: 2,
                },
            },
            {
                name: '其他重大影响/共同控制方',
                x: 680,
                y: 0,
                value: '影响',
                symbol: 'rect',
                symbolSize: [142, 218],
                itemStyle: {
                    color: '#2D3034',
                    borderColor: '#4F77A8',
                    borderWidth: 2,
                },
                label: {
                    padding: [-190, 0, 0, 0],
                    color: '#4F77A8'
                }
            },
            {
                name: '_其他重大影响辅助线',
                x: 680,
                y: 400,
                symbolSize: [1, 1],

            },
            {
                name: '联营/合营公司',
                x: 400,
                y: 400,
                symbol: 'rect',
                symbolSize: [142, 218],
                itemStyle: {
                    color: '#2D3034',
                    borderColor: '#728A4F',
                    borderWidth: 2,
                },
                label: {
                    padding: [-190, 0, 0, 0],
                    color: '#728A4F'
                }

            },
            {
                //这个节点是转折点
                name: '_联营/合营公司辅助线',
                x: 120,
                y: 400,
                symbolSize: [1, 1],


            },

        ],
        // links: [],
        //这是点与点之间的连接关系
        links: [{
                source: '_中建一局集团建设发展有限公司辅助线',
                target: '母公司',
                symbol: ['arrow', 'none'],


            },
            {
                source: '子公司',
                target: '_子公司辅助线',
                symbol: ['arrow', 'none'],
                value: [{
                    label: '控制'
                }],
                label: {
                    padding: [0, 0, 0, 4],
                    show: true,
                    formatter: function(params) {
                        return params.value[0].label
                    }

                },

            },
            {
                source: '联营/合营公司',
                target: '_联营/合营公司辅助线', //x是第一个小转折点
                value: [{
                    label: '影响'
                }],
                label: {
                    show: true,
                    formatter: function(params) {

                        return params.value[0].label
                    }

                },

            },
            {
                source: '_联营/合营公司辅助线',
                target: '中建一局集团建设发展有限公司',
                symbol: ['arrow', 'none']
            },
            {
                source: '其他重大影响/共同控制方',
                target: '_其他重大影响辅助线',
                symbol: ['none', 'arrow'],

            }, {
                source: '_其他重大影响辅助线',
                target: '联营/合营公司',
                value: [{
                    label: '影响'
                }],
                label: {
                    show: true,
                    align: 'left',
                    formatter: function(params) {

                        return params.value[0].label
                    }

                },

            }, {
                source: '_兄弟公司辅助线',
                target: '兄弟公司',
                value: [{
                    label: '控制'
                }],
                label: {
                    padding: [0, 0, 0, -40],
                    show: true,
                    formatter: function(params) {
                        return params.value[0].label
                    }

                },

            }, {
                source: '_兄弟公司辅助线',
                target: '实际控制方',
                symbol: ['arrow', 'none'],

            }, {
                source: '_实际控制方辅助线',
                target: '实际控制方',
                value: [{
                    label: '控制'
                }],
                label: {
                    show: true,
                    formatter: function(params) {
                        return params.value[0].label
                    }
                },
            }, {
                source: '_实际控制方辅助线',

                target: '母公司的其他股东',

                symbol: ['arrow', 'none'],

            }, {
                source: '_母公司辅助线',
                target: '母公司',
                value: [{
                    label: '控制'
                }],
                label: {
                    show: true,
                    formatter: function(params) {
                        return params.value[0].label
                    }
                }
            }, {
                source: '_母公司辅助线',
                target: '母公司的其他股东',
                symbol: ['arrow', 'none'],
            }, {
                source: '_子公司辅助线',
                target: '中建一局集团建设发展有限公司',
            }, {
                source: '_中建一局集团建设发展有限公司辅助线',
                target: '中建一局集团建设发展有限公司',
                value: [{
                    label: '控制'
                }],

                label: {
                    padding: [100, 0, 0, -120],
                    show: true,
                    formatter: function(params) {
                        return params.value[0].label
                    }

                },
            }



        ],
        //线条的颜色
        lineStyle: {
            normal: {

                color: '#2B4A4D',
                //type: 'dashed',
                width: 2,

            }
        }
    }]
};

相关文章

  • 使用python脚本自动生成K8S-YAML

    title: "使用python脚本自动生成K8S-YAML" date: "2020-06-11" catego...

  • 魏城《蓝色海洋之底》

    蓝色海洋之底 作者:魏城 写于2020-06-11 伦敦 ………………………………………………… 又一次找到你 找...

  • 最新mac、windows IntelliJ IDEA激活

    2020-06-11更新:jetbrains-agent.jar文件更新,适用2020.1.1版本,请下载最新版j...

  • 一封家书

    2020-06-11 儿子: 是不是好兴奋?又收到了妈妈的来信,上周因为妈妈手术,所以空了一周没有给你寄信,以...

  • 2020-06-16

    杜永曦 简书作者 2020-06-11 14:41 有效沟通,实现双赢 杜永曦 简书作者 2020-06-02 0...

  • 2020-06-11|感恩日记

    2020-06-11|感恩日记 今天的自己很开心,因为每个今天都是新的开始。 1.感恩今天的朋友,因为自己突然有一...

  • 【D170】无法沟通的主要原因是什么?——写作营共读打卡第137

    2020-06-11,周四,晴 今天阅读《非暴力沟通》第四章。 Day137《你关注自己的感受吗?》 ——写作营第...

  • 2020-06-11

    2020-06-11 其实很沮丧,因为种种原因,我选择把情绪地发泄放到私人空间。其实,讨厌充满负能量的自己。但家,...

  • 秘密

    2020-06-11壬午月乙酉日 这段时间读茨威格的小说,感叹于人性的复杂和命运的捉弄,人的心理可以如此强大,创造...

  • 《大明王朝1566》- 阶级的继承

    2020-06-11 前几天看完了《大明王朝1566》,45集连续剧,感慨颇多,还买了一套书来回味! 本来觉得这个...

网友评论

      本文标题:2020-06-11

      本文链接:https://www.haomeiwen.com/subject/fijitktx.html