首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >echarts关系图

echarts关系图

作者头像
阿超
发布于 2022-09-29 01:03:56
发布于 2022-09-29 01:03:56
2.1K11
代码可运行
举报
文章被收录于专栏:快乐阿超快乐阿超
运行总次数:1
代码可运行

交一个读破万卷书邪士,不如交一个不识一字端人——金缨

案例地址:https://echarts.apache.org/examples/zh/editor.html?c=graph&version=5.3.3

点击下方下载示例即可下载:

我这里也根据文档写了个demo

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!--
	此示例下载自 https://echarts.apache.org/examples/zh/editor.html?c=graph
-->
<!DOCTYPE html>
<html lang="zh-CN" style="height: 100%">

<head>
  <meta charset="utf-8">
</head>

<body style="height: 100%; margin: 0">
  <div id="container" style="height: 100%"></div>

  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/jquery"></script>
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@5.3.3/dist/echarts.min.js"></script>
  <!-- Uncomment this line if you want to dataTool extension
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@5.3.3/dist/extension/dataTool.min.js"></script>
  -->
  <!-- Uncomment this line if you want to use gl extension
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts-gl@2/dist/echarts-gl.min.js"></script>
  -->
  <!-- Uncomment this line if you want to echarts-stat extension
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts-stat@latest/dist/ecStat.min.js"></script>
  -->
  <!-- Uncomment this line if you want to use map
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@4.9.0/map/js/china.js"></script>
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@4.9.0/map/js/world.js"></script>
  -->
  <!-- Uncomment these two lines if you want to use bmap extension
  <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=YOUR_API_KEY"></script>
  <script type="text/javascript" src="https://fastly.jsdelivr.net/npm/echarts@5.3.3/dist/extension/bmap.min.js"></script>
  -->

  <script type="text/javascript">

    var dom = document.getElementById('container');
    var myChart = echarts.init(dom, null, {
      renderer: 'canvas',
      useDirtyRect: false
    });
    var app = {};
    var ROOT_PATH = 'https://echarts.apache.org/examples';
    var option;

    myChart.showLoading();
    // $.getJSON(ROOT_PATH + '/data/asset/data/les-miserables.json', function (graph) {
    $.getJSON('./json/relation-echarts.json', function (graph) {
      myChart.hideLoading();
      graph.nodes.forEach(function (node) {
        node.label = {
          show: node.symbolSize > 30
        };
      });
      option = {
        title: {
          text: '人物关系',
          subtext: 'Default layout',
          top: 'bottom',
          left: 'right'
        },
        tooltip: {
          formatter: function (params, ticket, callback) {
            /* $.get('detail?name=' + params.name, function (content) {
              callback(ticket, toHTML(content));
            }); */
            // console.log({ params, ticket, callback });
            return `
            <b>${params.value}</b><br/>
            <img height="100px" src="https://vampireachao.gitee.io/imgs/preview/3255_3.jpg"/>                
            `;
          }
        },
        legend: [
          {
            // selectedMode: 'single',
            data: graph.categories.map(function (a) {
              return a.name;
            })
          }
        ],
        animationDuration: 1500,
        animationEasingUpdate: 'quinticInOut',
        series: [
          {
            name: '人物介绍',
            type: 'graph',
            layout: 'none',
            data: graph.nodes,
            links: graph.links,
            categories: graph.categories,
            roam: true,
            label: {
              position: 'right',
              formatter: '{b}'
            },
            lineStyle: {
              color: 'source',
              curveness: 0.3
            },
            emphasis: {
              focus: 'adjacency',
              lineStyle: {
                width: 10
              }
            }
          }
        ]
      };
      myChart.setOption(option);
    });

    if (option && typeof option === 'object') {
      myChart.setOption(option);
    }

    window.addEventListener('resize', myChart.resize);
  </script>
</body>

</html>

对应的json数据

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
{
    "nodes": [
        {
            "id": "0",
            "name": "Myriel",
            "symbolSize": 19.12381,
            "x": -266.82776,
            "y": 299.6904,
            "value": 28.685715,
            "category": 0
        },
        {
            "id": "1",
            "name": "Napoleon",
            "symbolSize": 2.6666666666666665,
            "x": -418.08344,
            "y": 446.8853,
            "value": 4,
            "category": 0
        },
        {
            "id": "2",
            "name": "MlleBaptistine",
            "symbolSize": 6.323809333333333,
            "x": -212.76357,
            "y": 245.29176,
            "value": 9.485714,
            "category": 1
        },
        {
            "id": "3",
            "name": "MmeMagloire",
            "symbolSize": 6.323809333333333,
            "x": -242.82404,
            "y": 235.26283,
            "value": 9.485714,
            "category": 1
        },
        {
            "id": "4",
            "name": "CountessDeLo",
            "symbolSize": 2.6666666666666665,
            "x": -379.30386,
            "y": 429.06424,
            "value": 4,
            "category": 0
        },
        {
            "id": "5",
            "name": "Geborand",
            "symbolSize": 2.6666666666666665,
            "x": -417.26337,
            "y": 406.03506,
            "value": 4,
            "category": 0
        },
        {
            "id": "6",
            "name": "Champtercier",
            "symbolSize": 2.6666666666666665,
            "x": -332.6012,
            "y": 485.16974,
            "value": 4,
            "category": 0
        },
        {
            "id": "7",
            "name": "Cravatte",
            "symbolSize": 2.6666666666666665,
            "x": -382.69568,
            "y": 475.09113,
            "value": 4,
            "category": 0
        },
        {
            "id": "8",
            "name": "Count",
            "symbolSize": 2.6666666666666665,
            "x": -320.384,
            "y": 387.17325,
            "value": 4,
            "category": 0
        },
        {
            "id": "9",
            "name": "OldMan",
            "symbolSize": 2.6666666666666665,
            "x": -344.39832,
            "y": 451.16772,
            "value": 4,
            "category": 0
        },
        {
            "id": "10",
            "name": "Labarre",
            "symbolSize": 2.6666666666666665,
            "x": -89.34107,
            "y": 234.56128,
            "value": 4,
            "category": 1
        },
        {
            "id": "11",
            "name": "主角",
            "symbolSize": 66.66666666666667,
            "x": -87.93029,
            "y": -6.8120565,
            "value": "关于这个角色的介绍...",
            "category": 1
        },
        {
            "id": "12",
            "name": "Marguerite",
            "symbolSize": 4.495239333333333,
            "x": -339.77908,
            "y": -184.69139,
            "value": 6.742859,
            "category": 1
        },
        {
            "id": "13",
            "name": "MmeDeR",
            "symbolSize": 2.6666666666666665,
            "x": -194.31313,
            "y": 178.55301,
            "value": 4,
            "category": 1
        },
        {
            "id": "14",
            "name": "Isabeau",
            "symbolSize": 2.6666666666666665,
            "x": -158.05168,
            "y": 201.99768,
            "value": 4,
            "category": 1
        },
        {
            "id": "15",
            "name": "Gervais",
            "symbolSize": 2.6666666666666665,
            "x": -127.701546,
            "y": 242.55057,
            "value": 4,
            "category": 1
        },
        {
            "id": "16",
            "name": "Tholomyes",
            "symbolSize": 17.295237333333333,
            "x": -385.2226,
            "y": -393.5572,
            "value": 25.942856,
            "category": 2
        },
        {
            "id": "17",
            "name": "Listolier",
            "symbolSize": 13.638097333333334,
            "x": -516.55884,
            "y": -393.98975,
            "value": 20.457146,
            "category": 2
        },
        {
            "id": "18",
            "name": "Fameuil",
            "symbolSize": 13.638097333333334,
            "x": -464.79382,
            "y": -493.57944,
            "value": 20.457146,
            "category": 2
        },
        {
            "id": "19",
            "name": "Blacheville",
            "symbolSize": 13.638097333333334,
            "x": -515.1624,
            "y": -456.9891,
            "value": 20.457146,
            "category": 2
        },
        {
            "id": "20",
            "name": "Favourite",
            "symbolSize": 13.638097333333334,
            "x": -408.12122,
            "y": -464.5048,
            "value": 20.457146,
            "category": 2
        },
        {
            "id": "21",
            "name": "Dahlia",
            "symbolSize": 13.638097333333334,
            "x": -456.44113,
            "y": -425.13303,
            "value": 20.457146,
            "category": 2
        },
        {
            "id": "22",
            "name": "Zephine",
            "symbolSize": 13.638097333333334,
            "x": -459.1107,
            "y": -362.5133,
            "value": 20.457146,
            "category": 2
        },
        {
            "id": "23",
            "name": "Fantine",
            "symbolSize": 28.266666666666666,
            "x": -313.42786,
            "y": -289.44803,
            "value": 42.4,
            "category": 2
        },
        {
            "id": "24",
            "name": "MmeThenardier",
            "symbolSize": 20.95238266666667,
            "x": 4.6313396,
            "y": -273.8517,
            "value": 31.428574,
            "category": 7
        },
        {
            "id": "25",
            "name": "Thenardier",
            "symbolSize": 30.095235333333335,
            "x": 82.80825,
            "y": -203.1144,
            "value": 45.142853,
            "category": 7
        },
        {
            "id": "26",
            "name": "Cosette",
            "symbolSize": 20.95238266666667,
            "x": 78.64646,
            "y": -31.512747,
            "value": 31.428574,
            "category": 6
        },
        {
            "id": "27",
            "name": "Javert",
            "symbolSize": 31.923806666666668,
            "x": -81.46074,
            "y": -204.20204,
            "value": 47.88571,
            "category": 7
        },
        {
            "id": "28",
            "name": "Fauchelevent",
            "symbolSize": 8.152382000000001,
            "x": -225.73984,
            "y": 82.41631,
            "value": 12.228573,
            "category": 4
        },
        {
            "id": "29",
            "name": "Bamatabois",
            "symbolSize": 15.466666666666667,
            "x": -385.6842,
            "y": -20.206686,
            "value": 23.2,
            "category": 3
        },
        {
            "id": "30",
            "name": "Perpetue",
            "symbolSize": 4.495239333333333,
            "x": -403.92447,
            "y": -197.69823,
            "value": 6.742859,
            "category": 2
        },
        {
            "id": "31",
            "name": "Simplice",
            "symbolSize": 8.152382000000001,
            "x": -281.4253,
            "y": -158.45137,
            "value": 12.228573,
            "category": 2
        },
        {
            "id": "32",
            "name": "Scaufflaire",
            "symbolSize": 2.6666666666666665,
            "x": -122.41348,
            "y": 210.37503,
            "value": 4,
            "category": 1
        },
        {
            "id": "33",
            "name": "Woman1",
            "symbolSize": 4.495239333333333,
            "x": -234.6001,
            "y": -113.15067,
            "value": 6.742859,
            "category": 1
        },
        {
            "id": "34",
            "name": "Judge",
            "symbolSize": 11.809524666666666,
            "x": -387.84915,
            "y": 58.7059,
            "value": 17.714287,
            "category": 3
        },
        {
            "id": "35",
            "name": "Champmathieu",
            "symbolSize": 11.809524666666666,
            "x": -338.2307,
            "y": 87.48405,
            "value": 17.714287,
            "category": 3
        },
        {
            "id": "36",
            "name": "Brevet",
            "symbolSize": 11.809524666666666,
            "x": -453.26874,
            "y": 58.94648,
            "value": 17.714287,
            "category": 3
        },
        {
            "id": "37",
            "name": "Chenildieu",
            "symbolSize": 11.809524666666666,
            "x": -386.44904,
            "y": 140.05937,
            "value": 17.714287,
            "category": 3
        },
        {
            "id": "38",
            "name": "Cochepaille",
            "symbolSize": 11.809524666666666,
            "x": -446.7876,
            "y": 123.38005,
            "value": 17.714287,
            "category": 3
        },
        {
            "id": "39",
            "name": "Pontmercy",
            "symbolSize": 6.323809333333333,
            "x": 336.49738,
            "y": -269.55914,
            "value": 9.485714,
            "category": 6
        },
        {
            "id": "40",
            "name": "Boulatruelle",
            "symbolSize": 2.6666666666666665,
            "x": 29.187843,
            "y": -460.13132,
            "value": 4,
            "category": 7
        },
        {
            "id": "41",
            "name": "Eponine",
            "symbolSize": 20.95238266666667,
            "x": 238.36697,
            "y": -210.00926,
            "value": 31.428574,
            "category": 7
        },
        {
            "id": "42",
            "name": "Anzelma",
            "symbolSize": 6.323809333333333,
            "x": 189.69513,
            "y": -346.50662,
            "value": 9.485714,
            "category": 7
        },
        {
            "id": "43",
            "name": "Woman2",
            "symbolSize": 6.323809333333333,
            "x": -187.00418,
            "y": -145.02663,
            "value": 9.485714,
            "category": 6
        },
        {
            "id": "44",
            "name": "MotherInnocent",
            "symbolSize": 4.495239333333333,
            "x": -252.99521,
            "y": 129.87549,
            "value": 6.742859,
            "category": 4
        },
        {
            "id": "45",
            "name": "Gribier",
            "symbolSize": 2.6666666666666665,
            "x": -296.07935,
            "y": 163.11964,
            "value": 4,
            "category": 4
        },
        {
            "id": "46",
            "name": "Jondrette",
            "symbolSize": 2.6666666666666665,
            "x": 550.3201,
            "y": 522.4031,
            "value": 4,
            "category": 5
        },
        {
            "id": "47",
            "name": "MmeBurgon",
            "symbolSize": 4.495239333333333,
            "x": 488.13535,
            "y": 356.8573,
            "value": 6.742859,
            "category": 5
        },
        {
            "id": "48",
            "name": "Gavroche",
            "symbolSize": 41.06667066666667,
            "x": 387.89572,
            "y": 110.462326,
            "value": 61.600006,
            "category": 8
        },
        {
            "id": "49",
            "name": "Gillenormand",
            "symbolSize": 13.638097333333334,
            "x": 126.4831,
            "y": 68.10622,
            "value": 20.457146,
            "category": 6
        },
        {
            "id": "50",
            "name": "Magnon",
            "symbolSize": 4.495239333333333,
            "x": 127.07365,
            "y": -113.05923,
            "value": 6.742859,
            "category": 6
        },
        {
            "id": "51",
            "name": "MlleGillenormand",
            "symbolSize": 13.638097333333334,
            "x": 162.63559,
            "y": 117.6565,
            "value": 20.457146,
            "category": 6
        },
        {
            "id": "52",
            "name": "MmePontmercy",
            "symbolSize": 4.495239333333333,
            "x": 353.66415,
            "y": -205.89165,
            "value": 6.742859,
            "category": 6
        },
        {
            "id": "53",
            "name": "MlleVaubois",
            "symbolSize": 2.6666666666666665,
            "x": 165.43939,
            "y": 339.7736,
            "value": 4,
            "category": 6
        },
        {
            "id": "54",
            "name": "LtGillenormand",
            "symbolSize": 8.152382000000001,
            "x": 137.69348,
            "y": 196.1069,
            "value": 12.228573,
            "category": 6
        },
        {
            "id": "55",
            "name": "Marius",
            "symbolSize": 35.58095333333333,
            "x": 206.44687,
            "y": -13.805411,
            "value": 53.37143,
            "category": 6
        },
        {
            "id": "56",
            "name": "BaronessT",
            "symbolSize": 4.495239333333333,
            "x": 194.82993,
            "y": 224.78036,
            "value": 6.742859,
            "category": 6
        },
        {
            "id": "57",
            "name": "Mabeuf",
            "symbolSize": 20.95238266666667,
            "x": 597.6618,
            "y": 135.18481,
            "value": 31.428574,
            "category": 8
        },
        {
            "id": "58",
            "name": "Enjolras",
            "symbolSize": 28.266666666666666,
            "x": 355.78366,
            "y": -74.882454,
            "value": 42.4,
            "category": 8
        },
        {
            "id": "59",
            "name": "Combeferre",
            "symbolSize": 20.95238266666667,
            "x": 515.2961,
            "y": -46.167564,
            "value": 31.428574,
            "category": 8
        },
        {
            "id": "60",
            "name": "Prouvaire",
            "symbolSize": 17.295237333333333,
            "x": 614.29285,
            "y": -69.3104,
            "value": 25.942856,
            "category": 8
        },
        {
            "id": "61",
            "name": "Feuilly",
            "symbolSize": 20.95238266666667,
            "x": 550.1917,
            "y": -128.17537,
            "value": 31.428574,
            "category": 8
        },
        {
            "id": "62",
            "name": "Courfeyrac",
            "symbolSize": 24.609526666666667,
            "x": 436.17184,
            "y": -12.7286825,
            "value": 36.91429,
            "category": 8
        },
        {
            "id": "63",
            "name": "Bahorel",
            "symbolSize": 22.780953333333333,
            "x": 602.55225,
            "y": 16.421427,
            "value": 34.17143,
            "category": 8
        },
        {
            "id": "64",
            "name": "Bossuet",
            "symbolSize": 24.609526666666667,
            "x": 455.81955,
            "y": -115.45826,
            "value": 36.91429,
            "category": 8
        },
        {
            "id": "65",
            "name": "Joly",
            "symbolSize": 22.780953333333333,
            "x": 516.40784,
            "y": 47.242233,
            "value": 34.17143,
            "category": 8
        },
        {
            "id": "66",
            "name": "Grantaire",
            "symbolSize": 19.12381,
            "x": 646.4313,
            "y": -151.06331,
            "value": 28.685715,
            "category": 8
        },
        {
            "id": "67",
            "name": "MotherPlutarch",
            "symbolSize": 2.6666666666666665,
            "x": 668.9568,
            "y": 204.65488,
            "value": 4,
            "category": 8
        },
        {
            "id": "68",
            "name": "Gueulemer",
            "symbolSize": 19.12381,
            "x": 78.4799,
            "y": -347.15146,
            "value": 28.685715,
            "category": 7
        },
        {
            "id": "69",
            "name": "Babet",
            "symbolSize": 19.12381,
            "x": 150.35959,
            "y": -298.50797,
            "value": 28.685715,
            "category": 7
        },
        {
            "id": "70",
            "name": "Claquesous",
            "symbolSize": 19.12381,
            "x": 137.3717,
            "y": -410.2809,
            "value": 28.685715,
            "category": 7
        },
        {
            "id": "71",
            "name": "Montparnasse",
            "symbolSize": 17.295237333333333,
            "x": 234.87747,
            "y": -400.85983,
            "value": 25.942856,
            "category": 7
        },
        {
            "id": "72",
            "name": "Toussaint",
            "symbolSize": 6.323809333333333,
            "x": 40.942253,
            "y": 113.78272,
            "value": 9.485714,
            "category": 1
        },
        {
            "id": "73",
            "name": "Child1",
            "symbolSize": 4.495239333333333,
            "x": 437.939,
            "y": 291.58234,
            "value": 6.742859,
            "category": 8
        },
        {
            "id": "74",
            "name": "Child2",
            "symbolSize": 4.495239333333333,
            "x": 466.04922,
            "y": 283.3606,
            "value": 6.742859,
            "category": 8
        },
        {
            "id": "75",
            "name": "Brujon",
            "symbolSize": 13.638097333333334,
            "x": 238.79364,
            "y": -314.06345,
            "value": 20.457146,
            "category": 7
        },
        {
            "id": "76",
            "name": "MmeHucheloup",
            "symbolSize": 13.638097333333334,
            "x": 712.18353,
            "y": 4.8131495,
            "value": 20.457146,
            "category": 8
        }
    ],
    "links": [
        {
            "source": "1",
            "target": "0"
        },
        {
            "source": "2",
            "target": "0"
        },
        {
            "source": "3",
            "target": "0"
        },
        {
            "source": "3",
            "target": "2"
        },
        {
            "source": "4",
            "target": "0"
        },
        {
            "source": "5",
            "target": "0"
        },
        {
            "source": "6",
            "target": "0"
        },
        {
            "source": "7",
            "target": "0"
        },
        {
            "source": "8",
            "target": "0"
        },
        {
            "source": "9",
            "target": "0"
        },
        {
            "source": "11",
            "target": "0"
        },
        {
            "source": "11",
            "target": "2"
        },
        {
            "source": "11",
            "target": "3"
        },
        {
            "source": "11",
            "target": "10"
        },
        {
            "source": "12",
            "target": "11"
        },
        {
            "source": "13",
            "target": "11"
        },
        {
            "source": "14",
            "target": "11"
        },
        {
            "source": "15",
            "target": "11"
        },
        {
            "source": "17",
            "target": "16"
        },
        {
            "source": "18",
            "target": "16"
        },
        {
            "source": "18",
            "target": "17"
        },
        {
            "source": "19",
            "target": "16"
        },
        {
            "source": "19",
            "target": "17"
        },
        {
            "source": "19",
            "target": "18"
        },
        {
            "source": "20",
            "target": "16"
        },
        {
            "source": "20",
            "target": "17"
        },
        {
            "source": "20",
            "target": "18"
        },
        {
            "source": "20",
            "target": "19"
        },
        {
            "source": "21",
            "target": "16"
        },
        {
            "source": "21",
            "target": "17"
        },
        {
            "source": "21",
            "target": "18"
        },
        {
            "source": "21",
            "target": "19"
        },
        {
            "source": "21",
            "target": "20"
        },
        {
            "source": "22",
            "target": "16"
        },
        {
            "source": "22",
            "target": "17"
        },
        {
            "source": "22",
            "target": "18"
        },
        {
            "source": "22",
            "target": "19"
        },
        {
            "source": "22",
            "target": "20"
        },
        {
            "source": "22",
            "target": "21"
        },
        {
            "source": "23",
            "target": "11"
        },
        {
            "source": "23",
            "target": "12"
        },
        {
            "source": "23",
            "target": "16"
        },
        {
            "source": "23",
            "target": "17"
        },
        {
            "source": "23",
            "target": "18"
        },
        {
            "source": "23",
            "target": "19"
        },
        {
            "source": "23",
            "target": "20"
        },
        {
            "source": "23",
            "target": "21"
        },
        {
            "source": "23",
            "target": "22"
        },
        {
            "source": "24",
            "target": "11"
        },
        {
            "source": "24",
            "target": "23"
        },
        {
            "source": "25",
            "target": "11"
        },
        {
            "source": "25",
            "target": "23"
        },
        {
            "source": "25",
            "target": "24"
        },
        {
            "source": "26",
            "target": "11"
        },
        {
            "source": "26",
            "target": "16"
        },
        {
            "source": "26",
            "target": "24"
        },
        {
            "source": "26",
            "target": "25"
        },
        {
            "source": "27",
            "target": "11"
        },
        {
            "source": "27",
            "target": "23"
        },
        {
            "source": "27",
            "target": "24"
        },
        {
            "source": "27",
            "target": "25"
        },
        {
            "source": "27",
            "target": "26"
        },
        {
            "source": "28",
            "target": "11"
        },
        {
            "source": "28",
            "target": "27"
        },
        {
            "source": "29",
            "target": "11"
        },
        {
            "source": "29",
            "target": "23"
        },
        {
            "source": "29",
            "target": "27"
        },
        {
            "source": "30",
            "target": "23"
        },
        {
            "source": "31",
            "target": "11"
        },
        {
            "source": "31",
            "target": "23"
        },
        {
            "source": "31",
            "target": "27"
        },
        {
            "source": "31",
            "target": "30"
        },
        {
            "source": "32",
            "target": "11"
        },
        {
            "source": "33",
            "target": "11"
        },
        {
            "source": "33",
            "target": "27"
        },
        {
            "source": "34",
            "target": "11"
        },
        {
            "source": "34",
            "target": "29"
        },
        {
            "source": "35",
            "target": "11"
        },
        {
            "source": "35",
            "target": "29"
        },
        {
            "source": "35",
            "target": "34"
        },
        {
            "source": "36",
            "target": "11"
        },
        {
            "source": "36",
            "target": "29"
        },
        {
            "source": "36",
            "target": "34"
        },
        {
            "source": "36",
            "target": "35"
        },
        {
            "source": "37",
            "target": "11"
        },
        {
            "source": "37",
            "target": "29"
        },
        {
            "source": "37",
            "target": "34"
        },
        {
            "source": "37",
            "target": "35"
        },
        {
            "source": "37",
            "target": "36"
        },
        {
            "source": "38",
            "target": "11"
        },
        {
            "source": "38",
            "target": "29"
        },
        {
            "source": "38",
            "target": "34"
        },
        {
            "source": "38",
            "target": "35"
        },
        {
            "source": "38",
            "target": "36"
        },
        {
            "source": "38",
            "target": "37"
        },
        {
            "source": "39",
            "target": "25"
        },
        {
            "source": "40",
            "target": "25"
        },
        {
            "source": "41",
            "target": "24"
        },
        {
            "source": "41",
            "target": "25"
        },
        {
            "source": "42",
            "target": "24"
        },
        {
            "source": "42",
            "target": "25"
        },
        {
            "source": "42",
            "target": "41"
        },
        {
            "source": "43",
            "target": "11"
        },
        {
            "source": "43",
            "target": "26"
        },
        {
            "source": "43",
            "target": "27"
        },
        {
            "source": "44",
            "target": "11"
        },
        {
            "source": "44",
            "target": "28"
        },
        {
            "source": "45",
            "target": "28"
        },
        {
            "source": "47",
            "target": "46"
        },
        {
            "source": "48",
            "target": "11"
        },
        {
            "source": "48",
            "target": "25"
        },
        {
            "source": "48",
            "target": "27"
        },
        {
            "source": "48",
            "target": "47"
        },
        {
            "source": "49",
            "target": "11"
        },
        {
            "source": "49",
            "target": "26"
        },
        {
            "source": "50",
            "target": "24"
        },
        {
            "source": "50",
            "target": "49"
        },
        {
            "source": "51",
            "target": "11"
        },
        {
            "source": "51",
            "target": "26"
        },
        {
            "source": "51",
            "target": "49"
        },
        {
            "source": "52",
            "target": "39"
        },
        {
            "source": "52",
            "target": "51"
        },
        {
            "source": "53",
            "target": "51"
        },
        {
            "source": "54",
            "target": "26"
        },
        {
            "source": "54",
            "target": "49"
        },
        {
            "source": "54",
            "target": "51"
        },
        {
            "source": "55",
            "target": "11"
        },
        {
            "source": "55",
            "target": "16"
        },
        {
            "source": "55",
            "target": "25"
        },
        {
            "source": "55",
            "target": "26"
        },
        {
            "source": "55",
            "target": "39"
        },
        {
            "source": "55",
            "target": "41"
        },
        {
            "source": "55",
            "target": "48"
        },
        {
            "source": "55",
            "target": "49"
        },
        {
            "source": "55",
            "target": "51"
        },
        {
            "source": "55",
            "target": "54"
        },
        {
            "source": "56",
            "target": "49"
        },
        {
            "source": "56",
            "target": "55"
        },
        {
            "source": "57",
            "target": "41"
        },
        {
            "source": "57",
            "target": "48"
        },
        {
            "source": "57",
            "target": "55"
        },
        {
            "source": "58",
            "target": "11"
        },
        {
            "source": "58",
            "target": "27"
        },
        {
            "source": "58",
            "target": "48"
        },
        {
            "source": "58",
            "target": "55"
        },
        {
            "source": "58",
            "target": "57"
        },
        {
            "source": "59",
            "target": "48"
        },
        {
            "source": "59",
            "target": "55"
        },
        {
            "source": "59",
            "target": "57"
        },
        {
            "source": "59",
            "target": "58"
        },
        {
            "source": "60",
            "target": "48"
        },
        {
            "source": "60",
            "target": "58"
        },
        {
            "source": "60",
            "target": "59"
        },
        {
            "source": "61",
            "target": "48"
        },
        {
            "source": "61",
            "target": "55"
        },
        {
            "source": "61",
            "target": "57"
        },
        {
            "source": "61",
            "target": "58"
        },
        {
            "source": "61",
            "target": "59"
        },
        {
            "source": "61",
            "target": "60"
        },
        {
            "source": "62",
            "target": "41"
        },
        {
            "source": "62",
            "target": "48"
        },
        {
            "source": "62",
            "target": "55"
        },
        {
            "source": "62",
            "target": "57"
        },
        {
            "source": "62",
            "target": "58"
        },
        {
            "source": "62",
            "target": "59"
        },
        {
            "source": "62",
            "target": "60"
        },
        {
            "source": "62",
            "target": "61"
        },
        {
            "source": "63",
            "target": "48"
        },
        {
            "source": "63",
            "target": "55"
        },
        {
            "source": "63",
            "target": "57"
        },
        {
            "source": "63",
            "target": "58"
        },
        {
            "source": "63",
            "target": "59"
        },
        {
            "source": "63",
            "target": "60"
        },
        {
            "source": "63",
            "target": "61"
        },
        {
            "source": "63",
            "target": "62"
        },
        {
            "source": "64",
            "target": "11"
        },
        {
            "source": "64",
            "target": "48"
        },
        {
            "source": "64",
            "target": "55"
        },
        {
            "source": "64",
            "target": "57"
        },
        {
            "source": "64",
            "target": "58"
        },
        {
            "source": "64",
            "target": "59"
        },
        {
            "source": "64",
            "target": "60"
        },
        {
            "source": "64",
            "target": "61"
        },
        {
            "source": "64",
            "target": "62"
        },
        {
            "source": "64",
            "target": "63"
        },
        {
            "source": "65",
            "target": "48"
        },
        {
            "source": "65",
            "target": "55"
        },
        {
            "source": "65",
            "target": "57"
        },
        {
            "source": "65",
            "target": "58"
        },
        {
            "source": "65",
            "target": "59"
        },
        {
            "source": "65",
            "target": "60"
        },
        {
            "source": "65",
            "target": "61"
        },
        {
            "source": "65",
            "target": "62"
        },
        {
            "source": "65",
            "target": "63"
        },
        {
            "source": "65",
            "target": "64"
        },
        {
            "source": "66",
            "target": "48"
        },
        {
            "source": "66",
            "target": "58"
        },
        {
            "source": "66",
            "target": "59"
        },
        {
            "source": "66",
            "target": "60"
        },
        {
            "source": "66",
            "target": "61"
        },
        {
            "source": "66",
            "target": "62"
        },
        {
            "source": "66",
            "target": "63"
        },
        {
            "source": "66",
            "target": "64"
        },
        {
            "source": "66",
            "target": "65"
        },
        {
            "source": "67",
            "target": "57"
        },
        {
            "source": "68",
            "target": "11"
        },
        {
            "source": "68",
            "target": "24"
        },
        {
            "source": "68",
            "target": "25"
        },
        {
            "source": "68",
            "target": "27"
        },
        {
            "source": "68",
            "target": "41"
        },
        {
            "source": "68",
            "target": "48"
        },
        {
            "source": "69",
            "target": "11"
        },
        {
            "source": "69",
            "target": "24"
        },
        {
            "source": "69",
            "target": "25"
        },
        {
            "source": "69",
            "target": "27"
        },
        {
            "source": "69",
            "target": "41"
        },
        {
            "source": "69",
            "target": "48"
        },
        {
            "source": "69",
            "target": "68"
        },
        {
            "source": "70",
            "target": "11"
        },
        {
            "source": "70",
            "target": "24"
        },
        {
            "source": "70",
            "target": "25"
        },
        {
            "source": "70",
            "target": "27"
        },
        {
            "source": "70",
            "target": "41"
        },
        {
            "source": "70",
            "target": "58"
        },
        {
            "source": "70",
            "target": "68"
        },
        {
            "source": "70",
            "target": "69"
        },
        {
            "source": "71",
            "target": "11"
        },
        {
            "source": "71",
            "target": "25"
        },
        {
            "source": "71",
            "target": "27"
        },
        {
            "source": "71",
            "target": "41"
        },
        {
            "source": "71",
            "target": "48"
        },
        {
            "source": "71",
            "target": "68"
        },
        {
            "source": "71",
            "target": "69"
        },
        {
            "source": "71",
            "target": "70"
        },
        {
            "source": "72",
            "target": "11"
        },
        {
            "source": "72",
            "target": "26"
        },
        {
            "source": "72",
            "target": "27"
        },
        {
            "source": "73",
            "target": "48"
        },
        {
            "source": "74",
            "target": "48"
        },
        {
            "source": "74",
            "target": "73"
        },
        {
            "source": "75",
            "target": "25"
        },
        {
            "source": "75",
            "target": "41"
        },
        {
            "source": "75",
            "target": "48"
        },
        {
            "source": "75",
            "target": "68"
        },
        {
            "source": "75",
            "target": "69"
        },
        {
            "source": "75",
            "target": "70"
        },
        {
            "source": "75",
            "target": "71"
        },
        {
            "source": "76",
            "target": "48"
        },
        {
            "source": "76",
            "target": "58"
        },
        {
            "source": "76",
            "target": "62"
        },
        {
            "source": "76",
            "target": "63"
        },
        {
            "source": "76",
            "target": "64"
        },
        {
            "source": "76",
            "target": "65"
        },
        {
            "source": "76",
            "target": "66"
        }
    ],
    "categories": [
        {
            "name": "A"
        },
        {
            "name": "B",
            "symbol": "image://https://waibi.oss-cn-chengdu.aliyuncs.com/2020-06-01/head.jpg"
        },
        {
            "name": "C"
        },
        {
            "name": "D"
        },
        {
            "name": "E"
        },
        {
            "name": "F"
        },
        {
            "name": "G"
        },
        {
            "name": "H"
        },
        {
            "name": "I"
        }
    ]
}

效果:

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-09-24,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
1 条评论
热度
最新
博主,这个输出文件HTML只能本地打开吗?能实现让别的用户也可以访问吗
博主,这个输出文件HTML只能本地打开吗?能实现让别的用户也可以访问吗
回复回复点赞举报
推荐阅读
编辑精选文章
换一批
原创投稿--数据可视化库go-echarts
我是一名 Golang 开发爱好者 今天开源了一个数据可视化库 想填补一下 Golang 在这方面的空缺 项目地址是:https://github.com/chenjiandongx/go-echarts
李海彬
2019/05/22
1.6K0
原创投稿--数据可视化库go-echarts
echarts 制作关系图
小焱
2025/09/11
1820
AngularJS引入Echarts的Demo
最近要用到图表展示,想了想,还是首选Echarts,HighCharts和D3.js备用吧,
JQ实验室
2022/02/09
5700
第50天:scrollTo小火箭返回顶部
scrollTo(x,y)//可把内容滚动到指定的坐标 scrollTo(xpos,ypos)//x,y值必需
半指温柔乐
2018/09/11
5320
echarts中国主要城市空气质量
行之苟有恒,久久自芬芳。——崔瑗 中国主要城市空气质量: 代码出处:https://echarts.apache.org/examples/zh/editor.html?c=effectScatt
阿超
2022/08/17
8620
echarts中国主要城市空气质量
【数据可视化】Echarts中的其它图表
上次提到了【数据可视化】Echarts最常用图表,其中还有一些图需要了解,这次来分享一下。
zxctscl
2024/03/21
6830
【数据可视化】Echarts中的其它图表
3.1 Contour绘制
首先一起学习利用百度的开源项目绘制contour,百度搜索“echarts heatmap”,找到热力图的一个案例(http://echarts.baidu.com/examples/#chart-type-heatmap),点击这个案例:
周星星9527
2018/08/08
1.5K0
3.1 Contour绘制
【数据处理包Pandas】分组及相关操作
数据集team.xlsx下载地址: 链接:https://pan.quark.cn/s/9e3b2a933510 提取码:7i2y
Francek Chen
2025/01/22
6030
【数据处理包Pandas】分组及相关操作
R语言入门 Chapter01 | 向量
这篇文章讲述的是R语言中关于向量相关知识。希望这篇R语言文章对您有所帮助!如果您有想学习的知识或建议,可以给作者留言
不温卜火
2020/10/28
1.3K0
第167天:canvas绘制柱状图
canvas绘制柱状图 1、HTML 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 6 <title>06柱状图面向对象版本</title> 7 <style> 8 bo
半指温柔乐
2018/09/11
1.5K0
第167天:canvas绘制柱状图
第42天:焦点图
1、焦点图 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>焦点图</title> 6 <style> 7 *{ 8 margin: 0; 9 padding: 0; 10 } 11 ul,ol{ 12 list-
半指温柔乐
2018/09/11
1.1K0
DS图—图的最短路径(无框架)迪杰斯特拉算法
每行格式:顶点v编号-其他顶点编号-最短路径值----[最短路径]。没有路径输出:顶点v编号-其他顶点编号--1。具体请参考示范数据
叶茂林
2023/07/30
3570
Python使用numpy生成批量数据
代码 import numpy as np def batch_gen(data): # 定义batch数据生成器1 idx = 0 while True: if idx + 10 > 100: idx = 0 start = idx idx += 10 yield data[start:start + 10] def batch_generator(data, batch_size): # 批数
致Great
2018/06/12
1.7K0
Ursnif针对意大利公司的新攻击
Ursnif 是十分活跃的威胁之一,通常针对意大利和欧洲多个行业发起垃圾邮件攻击。
FB客服
2020/05/25
1.3K0
Ursnif针对意大利公司的新攻击
结合vue展示百度天气接口天气预报
HTML: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 8 <title>百度天气</title>
ProsperLee
2018/10/24
7.3K1
结合vue展示百度天气接口天气预报
如何锁定表头和表行同时锁定_jquery表头固定列
前段时间需要这个功能,但是找了很多都不能完美的实现,不是只能锁定表头,就是浏览器兼容问题什么的,在此就自己做了一个锁定表头和列的js方法,依赖于JQuery。
全栈程序员站长
2022/09/20
3.2K0
如何锁定表头和表行同时锁定_jquery表头固定列
常用编码表
Text-to-speech function is limited to 200 characters
botkenni
2019/09/03
1.1K0
常用编码表
学生管理系统(springMVC)
《Java Web编程》课程设计  学生管理系统 完成日期:   2018年12月26日   1  项目引言 1.1  项目简介        学生入校后,我们需要管理这些学生,那么就需要我们对这些学生进行很多的操作,此时我们学校对学生有条理的管理,包括一些基本信息的记录,就方便了学生的信息管理。 1.2  使用技术        这是一个学生管理系统,应用的是SSH框架Spring+SpringMVC+Hibernate的项目, 运用的知识:        spring,spring
泰斗贤若如
2019/06/18
4.3K0
学生管理系统(springMVC)
AVFrame转换到Mat,yuv420p转换到RGB源代码
FFmpeg中AVFrame到OpenCV中Mat的两种转换方法 方法一:查表法 void AVFrame2Img(AVFrame *pFrame, cv::Mat& img) { int frameHeight = pFrame->height; int frameWidth = pFrame->width; int channels = 3; //输出图像分配内存 img = cv::Mat::zeros(frameHeight, frameWidth, CV_8
一棹烟波
2018/01/12
2.7K0
ajax导致Echarts不显示饼图数据、柱状图数据只显示气泡的问题。
  ajax的同步。这个同步的意思是当JS代码加载到当前ajax的时候会把页面里所有的代码停止加载,页面出去假死状态,当这个ajax执行完毕后才会继续运行其他代码页面假死状态解除。而异步则这个ajax代码运行中的时候其他代码一样可以运行。   jQuery的async:false,这个属性。默认是true:异步;false:同步。   默认设置下,所有请求均为异步请求。如果需要发送同步请求,请将此选项设置为 false。   注意,同步请求将锁住浏览器,用户其它操作必须等待请求完成才可以执行。
别先生
2019/06/03
1.8K0
相关推荐
原创投稿--数据可视化库go-echarts
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档