Graph 简单示例echarts graph配置项内容和展示

右上角的 正常标签的图片无法通过过 categories: [{ name: '蒸发量', }, { name: '正常', symbol:'path://M889.621 620.025l-366.131 209.756c-4.311 2.52-9.491 4.007-15.019 4.007s-10.708-1.487-15.162-4.085l-365.932-209.736c-9.024-5.228-15.002-14.834-15.019-25.838v-419.605c0-10.688 5.738-20.475 15.019-25.875l366.075-209.812c4.327-2.453 9.504-3.898 15.019-3.898s10.692 1.446 15.172 3.978l365.977 209.733c9.035 5.235 15.017 14.857 15.019 25.878v419.622c-0.003 11.019-5.985 20.642-14.878 25.799zM844.564 191.681l-336.094-192.6-336.038 192.6v385.256l336.038 192.6 336.094-192.6v-385.2zM258.046 517.144c-2.535-4.283-4.032-9.437-4.032-14.942 0-11.018 6.001-20.637 14.914-25.763l209.169-119.889v-236.925c0-16.538 13.387-29.813 30.037-29.813 0.067-0.001 0.146-0.001 0.225-0.001 16.464 0 29.813 13.348 29.813 29.813 0 0 0 0.001 0 0.001v236.588

配置项如下
      option = {
    title: {
        text: '关于legend里图片无法自定义的问题'
    },
    tooltip: {},
    animationDurationUpdate: 1500,
    animationEasingUpdate: 'quinticInOut',
    legend: [{
                        x: "center",
                        show: true,
                        itemHeight:20,
                        data: [ {
                name:'蒸发量',
                textStyle:{
                    fontSize:16,
                    fontWeight:'bolder',
                    color:'#cccccc'
                },
                icon:'path://M889.621 620.025l-366.131 209.756c-4.311 2.52-9.491 4.007-15.019 4.007s-10.708-1.487-15.162-4.085l-365.932-209.736c-9.024-5.228-15.002-14.834-15.019-25.838v-419.605c0-10.688 5.738-20.475 15.019-25.875l366.075-209.812c4.327-2.453 9.504-3.898 15.019-3.898s10.692 1.446 15.172 3.978l365.977 209.733c9.035 5.235 15.017 14.857 15.019 25.878v419.622c-0.003 11.019-5.985 20.642-14.878 25.799zM844.564 191.681l-336.094-192.6-336.038 192.6v385.256l336.038 192.6 336.094-192.6v-385.2zM258.046 517.144c-2.535-4.283-4.032-9.437-4.032-14.942 0-11.018 6.001-20.637 14.914-25.763l209.169-119.889v-236.925c0-16.538 13.387-29.813 30.037-29.813 0.067-0.001 0.146-0.001 0.225-0.001 16.464 0 29.813 13.348 29.813 29.813 0 0 0 0.001 0 0.001v236.588l209.756 120.262c9.046 5.22 15.037 14.841 15.037 25.86 0 5.495-1.49 10.643-4.087 15.060-5.269 8.844-14.928 14.77-25.971 14.77-5.526 0-10.704-1.483-15.16-4.074l-209.274-119.903-209.363 119.981c-4.296 2.482-9.45 3.948-14.946 3.948-11.077 0-20.766-5.953-26.039-14.834z',
             
            }] //
                    },
                    {
                        x: "right",
                        show: true,
                        data: ['正常','轻微告警','重要告警','严重告警'] //
                    }],
    series : [
        {
            type: 'graph',
            layout: 'none',
            symbolSize: 50,
            roam: true,
            label: {
                normal: {
                    show: true
                }
            },
            edgeSymbol: ['circle', 'arrow'],
            edgeSymbolSize: [4, 10],
            edgeLabel: {
                normal: {
                    textStyle: {
                        fontSize: 20
                    }
                }
            },
            categories: [{
                            name: '蒸发量',
                             
                            
                        },
                        {
                            name: '正常',
                            symbol:'path://M889.621 620.025l-366.131 209.756c-4.311 2.52-9.491 4.007-15.019 4.007s-10.708-1.487-15.162-4.085l-365.932-209.736c-9.024-5.228-15.002-14.834-15.019-25.838v-419.605c0-10.688 5.738-20.475 15.019-25.875l366.075-209.812c4.327-2.453 9.504-3.898 15.019-3.898s10.692 1.446 15.172 3.978l365.977 209.733c9.035 5.235 15.017 14.857 15.019 25.878v419.622c-0.003 11.019-5.985 20.642-14.878 25.799zM844.564 191.681l-336.094-192.6-336.038 192.6v385.256l336.038 192.6 336.094-192.6v-385.2zM258.046 517.144c-2.535-4.283-4.032-9.437-4.032-14.942 0-11.018 6.001-20.637 14.914-25.763l209.169-119.889v-236.925c0-16.538 13.387-29.813 30.037-29.813 0.067-0.001 0.146-0.001 0.225-0.001 16.464 0 29.813 13.348 29.813 29.813 0 0 0 0.001 0 0.001v236.588l209.756 120.262c9.046 5.22 15.037 14.841 15.037 25.86 0 5.495-1.49 10.643-4.087 15.060-5.269 8.844-14.928 14.77-25.971 14.77-5.526 0-10.704-1.483-15.16-4.074l-209.274-119.903-209.363 119.981c-4.296 2.482-9.45 3.948-14.946 3.948-11.077 0-20.766-5.953-26.039-14.834z',

                        }],
            data: [{
                name: '节点1',
                x: 300,
                y: 300,
                symbolRotate: 180,
                category:1

            }, {
                name: '节点2',
                x: 800,
                y: 300
            }, {
                name: '节点3',
                x: 550,
                y: 100
            }, {
                name: '节点4',
                x: 550,
                y: 500
            }],
            // links: [],
            links: [{
                source: 0,
                target: 1,
                symbolSize: [5, 20],
                label: {
                    normal: {
                        show: true
                    }
                },
                lineStyle: {
                    normal: {
                        width: 5,
                        curveness: 0.2
                    }
                }
            }, {
                source: '节点2',
                target: '节点1',
                label: {
                    normal: {
                        show: true
                    }
                },
                lineStyle: {
                    normal: { curveness: 0.2 }
                }
            }, {
                source: '节点1',
                target: '节点3'
            }, {
                source: '节点2',
                target: '节点3'
            }, {
                source: '节点2',
                target: '节点4'
            }, {
                source: '节点1',
                target: '节点4'
            }],
            lineStyle: {
                normal: {
                    opacity: 0.9,
                    width: 2,
                    curveness: 0
                }
            }
        }
    ]
};
    
截图如下