123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <html>
- <head>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis.css" type="text/css" />
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis-network.min.js"> </script>
- <center>
- <h1>None</h1>
- </center>
- <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
- <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
- <style type="text/css">
- #mynetwork {
- width: 100%;
- height: 600px;
- background-color: #444444;
- border: 1px solid lightgray;
- position: relative;
- float: left;
- }
-
-
-
- </style>
- </head>
- <body>
- <div id="google">
- <div id = "mynetwork"></div>
- </div>
- <script type="text/javascript">
- // initialize global variables.
- var edges;
- var nodes;
- var network;
- var container;
- var options, data;
-
- // This method is responsible for drawing the graph, returns the drawn network
- function drawGraph() {
- var container = document.getElementById('mynetwork');
-
-
- // parsing and collecting nodes and edges from the python
- nodes = new vis.DataSet([{"font": {"color": "white"}, "id": "icon", "label": "icon", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 8, "label": 8, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 9, "label": 9, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u5e78\u798f\u7a7a\u9593", "label": "\u5e78\u798f\u7a7a\u9593", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u8a2d\u8a08", "label": "\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u9b4f\u5b50\u6db5", "label": "\u9b4f\u5b50\u6db5", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "is", "label": "is", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 6, "label": 6, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "is\u570b\u969b\u8a2d\u8a08", "label": "is\u570b\u969b\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u570b\u969b\u8a2d\u8a08", "label": "\u570b\u969b\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6a02\u5c45", "label": "\u6a02\u5c45", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u8a2d\u8a08\u5e2b", "label": "\u8a2d\u8a08\u5e2b", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u9673\u5609\u9d3b", "label": "\u9673\u5609\u9d3b", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "logo", "label": "logo", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 1, "label": 1, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 14, "label": 14, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u7a7a\u9593", "label": "\u7a7a\u9593", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u590f\u5929\u502b", "label": "\u590f\u5929\u502b", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u512a\u5ba2\u7f8e", "label": "\u512a\u5ba2\u7f8e", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 12, "label": 12, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u512a\u5c3c", "label": "\u512a\u5c3c", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u512a\u5c3c\u514b\u8a2d\u8a08", "label": "\u512a\u5c3c\u514b\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u512a\u5c3c\u5ba2", "label": "\u512a\u5c3c\u5ba2", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u512a\u5c3c\u5ba2\u7a7a\u9593\u8a2d\u8a08", "label": "\u512a\u5c3c\u5ba2\u7a7a\u9593\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u512a\u5c3c\u5ba2\u7a7a\u9593\u8a2d\u8a08\u6709\u9650\u516c\u53f8", "label": "\u512a\u5c3c\u5ba2\u7a7a\u9593\u8a2d\u8a08\u6709\u9650\u516c\u53f8", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u540d\u5c07\u9435\u677f\u71d2", "label": "\u540d\u5c07\u9435\u677f\u71d2", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u540e\u91cc\u85a9\u514b\u65af\u98a8\u73a9\u5bb6\u9928", "label": "\u540e\u91cc\u85a9\u514b\u65af\u98a8\u73a9\u5bb6\u9928", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u5c3c\u5ba2", "label": "\u5c3c\u5ba2", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u7406\u63da\u8a2d\u8a08", "label": "\u7406\u63da\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u7406\u63da\u8a2d\u8a08\u8cbb\u7528", "label": "\u7406\u63da\u8a2d\u8a08\u8cbb\u7528", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u8001\u7766\u5bb6", "label": "\u8001\u7766\u5bb6", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u9326\u62c9\u9eb5", "label": "\u9326\u62c9\u9eb5", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u9ec3\u4ef2\u5747", "label": "\u9ec3\u4ef2\u5747", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u5468\u5f65\u5982", "label": "\u5468\u5f65\u5982", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 10, "label": 10, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u5f35\u5fb7\u826f", "label": "\u5f35\u5fb7\u826f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 2, "label": 2, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6210\u5883\u8a2d\u8a08", "label": "\u6210\u5883\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 16, "label": 16, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6f84\u5883", "label": "\u6f84\u5883", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6f84\u5883\u5ba4\u5167\u8a2d\u8a08", "label": "\u6f84\u5883\u5ba4\u5167\u8a2d\u8a08", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u674e\u6d61\u6690", "label": "\u674e\u6d61\u6690", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 4, "label": 4, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6c34\u8a2d", "label": "\u6c34\u8a2d", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6797\u5cf0\u5b89", "label": "\u6797\u5cf0\u5b89", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 5, "label": 5, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": 11, "label": 11, "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6c6a\u5fe0\u9320", "label": "\u6c6a\u5fe0\u9320", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u738b\u601d\u6587", "label": "\u738b\u601d\u6587", "shape": "dot", "size": 10}]);
- edges = new vis.DataSet([{"borderwidth": 3, "from": "icon", "to": 8, "weight": 3, "width": 3}, {"borderwidth": 3, "from": "icon", "to": 9, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 9, "to": "\u5e78\u798f\u7a7a\u9593", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 9, "to": "\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 9, "to": "\u9b4f\u5b50\u6db5", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "is", "to": 6, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "is\u570b\u969b\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "\u570b\u969b\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "\u5e78\u798f\u7a7a\u9593", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "\u6a02\u5c45", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "\u8a2d\u8a08\u5e2b", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 6, "to": "\u9673\u5609\u9d3b", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "logo", "to": 1, "weight": 3, "width": 3}, {"borderwidth": 3, "from": "logo", "to": 14, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 1, "to": "\u7a7a\u9593", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 14, "to": "\u590f\u5929\u502b", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u512a\u5ba2\u7f8e", "to": 12, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u512a\u5c3c", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u512a\u5c3c\u514b\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u512a\u5c3c\u5ba2", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u512a\u5c3c\u5ba2\u7a7a\u9593\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u512a\u5c3c\u5ba2\u7a7a\u9593\u8a2d\u8a08\u6709\u9650\u516c\u53f8", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u540d\u5c07\u9435\u677f\u71d2", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u540e\u91cc\u85a9\u514b\u65af\u98a8\u73a9\u5bb6\u9928", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u5c3c\u5ba2", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u6a02\u5c45", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u7406\u63da\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u7406\u63da\u8a2d\u8a08\u8cbb\u7528", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u8001\u7766\u5bb6", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u9326\u62c9\u9eb5", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 12, "to": "\u9ec3\u4ef2\u5747", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u5468\u5f65\u5982", "to": 10, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 10, "to": "\u5e78\u798f\u7a7a\u9593", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u5f35\u5fb7\u826f", "to": 2, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 2, "to": "\u7406\u63da\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u6210\u5883\u8a2d\u8a08", "to": 16, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 16, "to": "\u6f84\u5883", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 16, "to": "\u6f84\u5883\u5ba4\u5167\u8a2d\u8a08", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u674e\u6d61\u6690", "to": 4, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 4, "to": "\u6a02\u5c45", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 4, "to": "\u6c34\u8a2d", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 4, "to": "\u7a7a\u9593", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u6797\u5cf0\u5b89", "to": 5, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 5, "to": "\u8a2d\u8a08\u5e2b", "weight": 3, "width": 3}, {"borderwidth": 3, "from": "\u6a02\u5c45", "to": 11, "weight": 3, "width": 3}, {"borderwidth": 3, "from": 11, "to": "\u6c6a\u5fe0\u9320", "weight": 3, "width": 3}, {"borderwidth": 3, "from": 11, "to": "\u738b\u601d\u6587", "weight": 3, "width": 3}]);
- // adding nodes and edges to the graph
- data = {nodes: nodes, edges: edges};
- var options = {
- "configure": {
- "enabled": false
- },
- "edges": {
- "color": {
- "inherit": true
- },
- "smooth": {
- "enabled": false,
- "type": "continuous"
- }
- },
- "interaction": {
- "dragNodes": true,
- "hideEdgesOnDrag": false,
- "hideNodesOnDrag": false
- },
- "physics": {
- "enabled": true,
- "stabilization": {
- "enabled": true,
- "fit": true,
- "iterations": 1000,
- "onlyDynamicEdges": false,
- "updateInterval": 50
- }
- }
- };
-
-
-
- network = new vis.Network(container, data, options);
-
-
- return network;
- }
- drawGraph();
- </script>
- </body>
- </html>
|