123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <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: 750px;
- background-color: #333333;
- border: 1px solid lightgray;
- position: relative;
- float: left;
- }
-
-
-
- </style>
- </head>
- <body>
- <div id = "mynetwork"></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": "\u6843\u5712", "label": "\u6843\u5712", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f", "label": "\u6843\u5712 \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "label": "\u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "label": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u6e7e \u6843\u5712 \u7a7a\u6e2f", "label": "\u53f0\u6e7e \u6843\u5712 \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 mrt", "label": "\u6843\u5712 mrt", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f", "label": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "label": "\u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f mrt", "label": "\u6843\u5712 \u7a7a\u6e2f mrt", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u6210\u7530", "label": "\u6843\u5712 \u6210\u7530", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u5317 \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "label": "\u53f0\u5317 \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u95a2\u7a7a \u6843\u5712", "label": "\u95a2\u7a7a \u6843\u5712", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u30d0\u30b9", "label": "\u6843\u5712 \u7a7a\u6e2f \u30d0\u30b9", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f \u30db\u30c6\u30eb", "label": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f \u30db\u30c6\u30eb", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u514d\u7a0e \u5e97", "label": "\u6843\u5712 \u7a7a\u6e2f \u514d\u7a0e \u5e97", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u30bf\u30fc\u30df\u30ca\u30eb", "label": "\u6843\u5712 \u7a7a\u6e2f \u30bf\u30fc\u30df\u30ca\u30eb", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u6a5f\u5834 \u6377 \u904b \u8def\u7dda \u56f3", "label": "\u6843\u5712 \u6a5f\u5834 \u6377 \u904b \u8def\u7dda \u56f3", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u7fbd\u7530 \u6843\u5712", "label": "\u7fbd\u7530 \u6843\u5712", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u5730\u4e0b\u9244", "label": "\u6843\u5712 \u5730\u4e0b\u9244", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u9001\u8fce", "label": "\u6843\u5712 \u7a7a\u6e2f \u9001\u8fce", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u8aad\u307f\u65b9", "label": "\u6843\u5712 \u7a7a\u6e2f \u8aad\u307f\u65b9", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u30ea\u30e0\u30b8\u30f3 \u30d0\u30b9", "label": "\u6843\u5712 \u7a7a\u6e2f \u30ea\u30e0\u30b8\u30f3 \u30d0\u30b9", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u30ce\u30dc\u30c6\u30eb \u6843\u5712", "label": "\u30ce\u30dc\u30c6\u30eb \u6843\u5712", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u30ce\u30dc\u30c6\u30eb \u53f0\u5317 \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "label": "\u30ce\u30dc\u30c6\u30eb \u53f0\u5317 \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u7dda", "label": "\u6843\u5712 \u7a7a\u6e2f \u7dda", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u9ad8 \u9435 \u6843\u5712 \u99c5", "label": "\u9ad8 \u9435 \u6843\u5712 \u99c5", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u30bf\u30af\u30b7\u30fc", "label": "\u6843\u5712 \u7a7a\u6e2f \u30bf\u30af\u30b7\u30fc", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u7b2c \u4e8c \u30bf\u30fc\u30df\u30ca\u30eb", "label": "\u6843\u5712 \u7a7a\u6e2f \u7b2c \u4e8c \u30bf\u30fc\u30df\u30ca\u30eb", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "label": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u7a7a\u6e2f \u304a \u571f\u7523", "label": "\u6843\u5712 \u7a7a\u6e2f \u304a \u571f\u7523", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u6843\u5712 \u95a2\u7a7a", "label": "\u6843\u5712 \u95a2\u7a7a", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f \u30a2\u30af\u30bb\u30b9", "label": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f \u30a2\u30af\u30bb\u30b9", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u7a7a\u6e2f", "label": "\u7a7a\u6e2f", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u56fd\u969b", "label": "\u56fd\u969b", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u6e7e", "label": "\u53f0\u6e7e", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u53f0\u5317", "label": "\u53f0\u5317", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "id": "\u30db\u30c6\u30eb", "label": "\u30db\u30c6\u30eb", "shape": "dot", "size": 10}]);
- edges = new vis.DataSet([{"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u6e7e \u6843\u5712 \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 mrt", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f mrt", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u6210\u7530", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u5317 \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u95a2\u7a7a \u6843\u5712", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u30d0\u30b9", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f \u30db\u30c6\u30eb", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u514d\u7a0e \u5e97", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u30bf\u30fc\u30df\u30ca\u30eb", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u6a5f\u5834 \u6377 \u904b \u8def\u7dda \u56f3", "weight": 1}, {"from": "\u6843\u5712", "to": "\u7fbd\u7530 \u6843\u5712", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u5730\u4e0b\u9244", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u9001\u8fce", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u8aad\u307f\u65b9", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u30ea\u30e0\u30b8\u30f3 \u30d0\u30b9", "weight": 1}, {"from": "\u6843\u5712", "to": "\u30ce\u30dc\u30c6\u30eb \u6843\u5712", "weight": 1}, {"from": "\u6843\u5712", "to": "\u30ce\u30dc\u30c6\u30eb \u53f0\u5317 \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u7dda", "weight": 1}, {"from": "\u6843\u5712", "to": "\u9ad8 \u9435 \u6843\u5712 \u99c5", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u30bf\u30af\u30b7\u30fc", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u7b2c \u4e8c \u30bf\u30fc\u30df\u30ca\u30eb", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u7a7a\u6e2f \u304a \u571f\u7523", "weight": 1}, {"from": "\u6843\u5712", "to": "\u6843\u5712 \u95a2\u7a7a", "weight": 1}, {"from": "\u6843\u5712", "to": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f \u30a2\u30af\u30bb\u30b9", "weight": 1}, {"from": "\u6843\u5712 \u7a7a\u6e2f", "to": "\u7a7a\u6e2f", "weight": 1}, {"from": "\u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "to": "\u56fd\u969b", "weight": 1}, {"from": "\u53f0\u6e7e \u6843\u5712 \u56fd\u969b \u7a7a\u6e2f", "to": "\u53f0\u6e7e", "weight": 1}, {"from": "\u53f0\u5317 \u6843\u5712 \u7a7a\u6e2f", "to": "\u53f0\u5317", "weight": 1}, {"from": "\u6843\u5712 \u7a7a\u6e2f \u30db\u30c6\u30eb", "to": "\u30db\u30c6\u30eb", "weight": 1}]);
- // 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>
|