116 lines
14 KiB
HTML
116 lines
14 KiB
HTML
<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></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: 800px;
|
|
background-color: #ffffff;
|
|
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([{"id": "Computergraphik, Bildverarbeitung, Wissenschaftliches Rechnen", "label": "Computergraphik, Bildverarbeitung, Wissenschaftliches Rechnen", "shape": "dot", "title": "Computergraphik, Bildverarbeitung, Wissenschaftliches Rechnen"}, {"id": "Intelligente Systeme", "label": "Intelligente Systeme", "shape": "dot", "title": "Intelligente Systeme"}, {"id": "Medizin-Management", "label": "Medizin-Management", "shape": "dot", "title": "Medizin-Management"}, {"id": "Institut f\u00fcr Medizinische Informatik, Biometrie und Epidemiologie", "label": "Institut f\u00fcr Medizinische Informatik, Biometrie und Epidemiologie", "shape": "dot", "title": "Institut f\u00fcr Medizinische Informatik, Biometrie und Epidemiologie"}, {"id": "Wirtschaftsinformatik und integrierte Informationssysteme", "label": "Wirtschaftsinformatik und integrierte Informationssysteme", "shape": "dot", "title": "Wirtschaftsinformatik und integrierte Informationssysteme"}, {"id": "Produktion und Industrielles Informationsmanagement", "label": "Produktion und Industrielles Informationsmanagement", "shape": "dot", "title": "Produktion und Industrielles Informationsmanagement"}, {"id": "Mechanische Verfahrenstechnik m. d. Schwerpunkt Wassertechnik", "label": "Mechanische Verfahrenstechnik m. d. Schwerpunkt Wassertechnik", "shape": "dot", "title": "Mechanische Verfahrenstechnik m. d. Schwerpunkt Wassertechnik"}, {"id": "Technische Chemie", "label": "Technische Chemie", "shape": "dot", "title": "Technische Chemie"}, {"id": "Institut f\u00fcr Psychologie", "label": "Institut f\u00fcr Psychologie", "shape": "dot", "title": "Institut f\u00fcr Psychologie"}, {"id": "Didaktik der Chemie", "label": "Didaktik der Chemie", "shape": "dot", "title": "Didaktik der Chemie"}, {"id": "Steuerung, Regelung und Systemdynamik", "label": "Steuerung, Regelung und Systemdynamik", "shape": "dot", "title": "Steuerung, Regelung und Systemdynamik"}, {"id": "Mechatronik", "label": "Mechatronik", "shape": "dot", "title": "Mechatronik"}, {"id": "Eingebettete Systeme der Informatik", "label": "Eingebettete Systeme der Informatik", "shape": "dot", "title": "Eingebettete Systeme der Informatik"}, {"id": "Networked Embedded Systems / Pervasive Computing", "label": "Networked Embedded Systems / Pervasive Computing", "shape": "dot", "title": "Networked Embedded Systems / Pervasive Computing"}, {"id": "Reaktive Fluide", "label": "Reaktive Fluide", "shape": "dot", "title": "Reaktive Fluide"}, {"id": "Institut f\u00fcr Schiffstechnik, Meerestechnik und Transportsysteme", "label": "Institut f\u00fcr Schiffstechnik, Meerestechnik und Transportsysteme", "shape": "dot", "title": "Institut f\u00fcr Schiffstechnik, Meerestechnik und Transportsysteme"}, {"id": "Nanostrukturtechnik", "label": "Nanostrukturtechnik", "shape": "dot", "title": "Nanostrukturtechnik"}, {"id": "Allgemeine und Theoretische Elektrotechnik", "label": "Allgemeine und Theoretische Elektrotechnik", "shape": "dot", "title": "Allgemeine und Theoretische Elektrotechnik"}, {"id": "Mechanik und Robotik", "label": "Mechanik und Robotik", "shape": "dot", "title": "Mechanik und Robotik"}, {"id": "Germanistik Linguistik", "label": "Germanistik Linguistik", "shape": "dot", "title": "Germanistik Linguistik"}, {"id": "Didaktik der Informatik", "label": "Didaktik der Informatik", "shape": "dot", "title": "Didaktik der Informatik"}, {"id": "Institut f\u00fcr Politikwissenschaft", "label": "Institut f\u00fcr Politikwissenschaft", "shape": "dot", "title": "Institut f\u00fcr Politikwissenschaft"}, {"id": "Geschichte", "label": "Geschichte", "shape": "dot", "title": "Geschichte"}, {"id": "E-Business und E-Entrepreneurship", "label": "E-Business und E-Entrepreneurship", "shape": "dot", "title": "E-Business und E-Entrepreneurship"}, {"id": "Bauelemente der H\u00f6chstfrequenz-Elektronik", "label": "Bauelemente der H\u00f6chstfrequenz-Elektronik", "shape": "dot", "title": "Bauelemente der H\u00f6chstfrequenz-Elektronik"}, {"id": "Spezifikation von Softwaresystemen", "label": "Spezifikation von Softwaresystemen", "shape": "dot", "title": "Spezifikation von Softwaresystemen"}, {"id": "Software Engineering", "label": "Software Engineering", "shape": "dot", "title": "Software Engineering"}, {"id": "Wirtschaftsinformatik und Unternehmensmodellierung", "label": "Wirtschaftsinformatik und Unternehmensmodellierung", "shape": "dot", "title": "Wirtschaftsinformatik und Unternehmensmodellierung"}, {"id": "Institut f\u00fcr Erziehungswissenschaft", "label": "Institut f\u00fcr Erziehungswissenschaft", "shape": "dot", "title": "Institut f\u00fcr Erziehungswissenschaft"}, {"id": "Anorganische Chemie", "label": "Anorganische Chemie", "shape": "dot", "title": "Anorganische Chemie"}, {"id": "Umweltmikrobiologie und Biotechnologie", "label": "Umweltmikrobiologie und Biotechnologie", "shape": "dot", "title": "Umweltmikrobiologie und Biotechnologie"}, {"id": "Institut f\u00fcr Berufs- und Weiterbildung", "label": "Institut f\u00fcr Berufs- und Weiterbildung", "shape": "dot", "title": "Institut f\u00fcr Berufs- und Weiterbildung"}, {"id": "Institut f\u00fcr Sport- und Bewegungswissenschaften", "label": "Institut f\u00fcr Sport- und Bewegungswissenschaften", "shape": "dot", "title": "Institut f\u00fcr Sport- und Bewegungswissenschaften"}, {"id": "Sprachtechnologie", "label": "Sprachtechnologie", "shape": "dot", "title": "Sprachtechnologie"}, {"id": "Sozialpsychologie: Medien und Kommunikation", "label": "Sozialpsychologie: Medien und Kommunikation", "shape": "dot", "title": "Sozialpsychologie: Medien und Kommunikation"}, {"id": "Software Systems Engineering", "label": "Software Systems Engineering", "shape": "dot", "title": "Software Systems Engineering"}, {"id": "Verteilte Systeme", "label": "Verteilte Systeme", "shape": "dot", "title": "Verteilte Systeme"}, {"id": "Energiewirtschaft", "label": "Energiewirtschaft", "shape": "dot", "title": "Energiewirtschaft"}, {"id": "Energiehandel und Finanzdienstleistungen", "label": "Energiehandel und Finanzdienstleistungen", "shape": "dot", "title": "Energiehandel und Finanzdienstleistungen"}, {"id": "Organische Chemie", "label": "Organische Chemie", "shape": "dot", "title": "Organische Chemie"}, {"id": "Zentrum f\u00fcr Kinder- und Jugendmedizin", "label": "Zentrum f\u00fcr Kinder- und Jugendmedizin", "shape": "dot", "title": "Zentrum f\u00fcr Kinder- und Jugendmedizin"}, {"id": "Verl\u00e4sslichkeit von Rechensystemen", "label": "Verl\u00e4sslichkeit von Rechensystemen", "shape": "dot", "title": "Verl\u00e4sslichkeit von Rechensystemen"}, {"id": "Nanopartikel Prozesstechnik", "label": "Nanopartikel Prozesstechnik", "shape": "dot", "title": "Nanopartikel Prozesstechnik"}, {"id": "Marketing und Handel", "label": "Marketing und Handel", "shape": "dot", "title": "Marketing und Handel"}, {"id": "\u00d6konometrie", "label": "\u00d6konometrie", "shape": "dot", "title": "\u00d6konometrie"}, {"id": "Klinik f\u00fcr Psychiatrie und Psychotherapie des Kindes und Jugenalters", "label": "Klinik f\u00fcr Psychiatrie und Psychotherapie des Kindes und Jugenalters", "shape": "dot", "title": "Klinik f\u00fcr Psychiatrie und Psychotherapie des Kindes und Jugenalters"}, {"id": "IWW Rheinisch-Westf\u00e4lisches Institut f\u00fcr Wasserforschung gGmbH", "label": "IWW Rheinisch-Westf\u00e4lisches Institut f\u00fcr Wasserforschung gGmbH", "shape": "dot", "title": "IWW Rheinisch-Westf\u00e4lisches Institut f\u00fcr Wasserforschung gGmbH"}, {"id": "Elektronische Bauelemente und Schaltungen", "label": "Elektronische Bauelemente und Schaltungen", "shape": "dot", "title": "Elektronische Bauelemente und Schaltungen"}]);
|
|
edges = new vis.DataSet([{"from": "Computergraphik, Bildverarbeitung, Wissenschaftliches Rechnen", "to": "Intelligente Systeme", "value": 2.0}, {"from": "Medizin-Management", "to": "Institut f\u00fcr Medizinische Informatik, Biometrie und Epidemiologie", "value": 2.0}, {"from": "Wirtschaftsinformatik und integrierte Informationssysteme", "to": "Produktion und Industrielles Informationsmanagement", "value": 2.0}, {"from": "Mechanische Verfahrenstechnik m. d. Schwerpunkt Wassertechnik", "to": "Technische Chemie", "value": 2.0}, {"from": "Institut f\u00fcr Psychologie", "to": "Didaktik der Chemie", "value": 2.0}, {"from": "Steuerung, Regelung und Systemdynamik", "to": "Mechatronik", "value": 4.0}, {"from": "Eingebettete Systeme der Informatik", "to": "Networked Embedded Systems / Pervasive Computing", "value": 4.0}, {"from": "Reaktive Fluide", "to": "Institut f\u00fcr Schiffstechnik, Meerestechnik und Transportsysteme", "value": 2.0}, {"from": "Nanostrukturtechnik", "to": "Allgemeine und Theoretische Elektrotechnik", "value": 2.0}, {"from": "Mechanik und Robotik", "to": "Intelligente Systeme", "value": 2.0}, {"from": "Germanistik Linguistik", "to": "Didaktik der Informatik", "value": 2.0}, {"from": "Institut f\u00fcr Politikwissenschaft", "to": "Geschichte", "value": 2.0}, {"from": "E-Business und E-Entrepreneurship", "to": "Produktion und Industrielles Informationsmanagement", "value": 2.0}, {"from": "Allgemeine und Theoretische Elektrotechnik", "to": "Bauelemente der H\u00f6chstfrequenz-Elektronik", "value": 2.0}, {"from": "Spezifikation von Softwaresystemen", "to": "Software Engineering", "value": 2.0}, {"from": "Wirtschaftsinformatik und Unternehmensmodellierung", "to": "Institut f\u00fcr Erziehungswissenschaft", "value": 2.0}, {"from": "Anorganische Chemie", "to": "Umweltmikrobiologie und Biotechnologie", "value": 2.0}, {"from": "Spezifikation von Softwaresystemen", "to": "Didaktik der Chemie", "value": 2.0}, {"from": "Didaktik der Chemie", "to": "Institut f\u00fcr Erziehungswissenschaft", "value": 4.0}, {"from": "Institut f\u00fcr Berufs- und Weiterbildung", "to": "Institut f\u00fcr Erziehungswissenschaft", "value": 2.0}, {"from": "Institut f\u00fcr Sport- und Bewegungswissenschaften", "to": "Reaktive Fluide", "value": 2.0}, {"from": "Steuerung, Regelung und Systemdynamik", "to": "Technische Chemie", "value": 2.0}, {"from": "Germanistik Linguistik", "to": "Sprachtechnologie", "value": 2.0}, {"from": "Institut f\u00fcr Psychologie", "to": "Sozialpsychologie: Medien und Kommunikation", "value": 2.0}, {"from": "Spezifikation von Softwaresystemen", "to": "Software Systems Engineering", "value": 2.0}, {"from": "Verteilte Systeme", "to": "Eingebettete Systeme der Informatik", "value": 4.0}, {"from": "Energiewirtschaft", "to": "Energiehandel und Finanzdienstleistungen", "value": 2.0}, {"from": "Organische Chemie", "to": "Umweltmikrobiologie und Biotechnologie", "value": 2.0}, {"from": "Zentrum f\u00fcr Kinder- und Jugendmedizin", "to": "Umweltmikrobiologie und Biotechnologie", "value": 1.0}, {"from": "Sozialpsychologie: Medien und Kommunikation", "to": "Intelligente Systeme", "value": 2.0}, {"from": "Spezifikation von Softwaresystemen", "to": "Verl\u00e4sslichkeit von Rechensystemen", "value": 2.0}, {"from": "Nanostrukturtechnik", "to": "Nanopartikel Prozesstechnik", "value": 2.0}, {"from": "Spezifikation von Softwaresystemen", "to": "Marketing und Handel", "value": 2.0}, {"from": "\u00d6konometrie", "to": "Spezifikation von Softwaresystemen", "value": 4.0}, {"from": "Nanostrukturtechnik", "to": "Bauelemente der H\u00f6chstfrequenz-Elektronik", "value": 4.0}, {"from": "Institut f\u00fcr Erziehungswissenschaft", "to": "Institut f\u00fcr Psychologie", "value": 1.0}, {"from": "Medizin-Management", "to": "Klinik f\u00fcr Psychiatrie und Psychotherapie des Kindes und Jugenalters", "value": 2.0}, {"from": "Nanostrukturtechnik", "to": "Reaktive Fluide", "value": 2.0}, {"from": "Intelligente Systeme", "to": "Sprachtechnologie", "value": 2.0}, {"from": "Mechanische Verfahrenstechnik m. d. Schwerpunkt Wassertechnik", "to": "IWW Rheinisch-Westf\u00e4lisches Institut f\u00fcr Wasserforschung gGmbH", "value": 2.0}, {"from": "Wirtschaftsinformatik und Unternehmensmodellierung", "to": "Produktion und Industrielles Informationsmanagement", "value": 2.0}, {"from": "Verteilte Systeme", "to": "Intelligente Systeme", "value": 4.0}, {"from": "Elektronische Bauelemente und Schaltungen", "to": "Eingebettete Systeme der Informatik", "value": 2.0}]);
|
|
|
|
// 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": true,
|
|
"hideNodesOnDrag": false
|
|
},
|
|
"physics": {
|
|
"barnesHut": {
|
|
"avoidOverlap": 0,
|
|
"centralGravity": 0.3,
|
|
"damping": 0.09,
|
|
"gravitationalConstant": -80000,
|
|
"springConstant": 0.001,
|
|
"springLength": 250
|
|
},
|
|
"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> |