healthsea-demo / viz.html
edichief's picture
Split apps
8ab7af3
<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: 700px;
height: 500px;
background-color: #0E1117;
border: 1px solid lightgray;
position: relative;
float: left;
}
#loadingBar {
position:absolute;
top:0px;
left:0px;
width: 700px;
height: 500px;
background-color:rgba(200,200,200,0.8);
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
opacity:1;
}
#bar {
position:absolute;
top:0px;
left:0px;
width:20px;
height:20px;
margin:auto auto auto auto;
border-radius:11px;
border:2px solid rgba(30,30,30,0.05);
background: rgb(0, 173, 246); /* Old browsers */
box-shadow: 2px 0px 4px rgba(0,0,0,0.4);
}
#border {
position:absolute;
top:10px;
left:10px;
width:500px;
height:23px;
margin:auto auto auto auto;
box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
border-radius:10px;
}
#text {
position:absolute;
top:8px;
left:530px;
width:30px;
height:50px;
margin:auto auto auto auto;
font-size:22px;
color: #000000;
}
div.outerBorder {
position:relative;
top:400px;
width:600px;
height:44px;
margin:auto auto auto auto;
border:8px solid rgba(0,0,0,0.1);
background: rgb(252,252,252); /* Old browsers */
background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
border-radius:72px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
}
</style>
</head>
<body>
<div id = "mynetwork"></div>
<div id="loadingBar">
<div class="outerBorder">
<div id="text">0%</div>
<div id="border">
<div id="bar"></div>
</div>
</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([{"color": "#4B9EFF", "font": {"color": "#ffffff"}, "id": "joint_pain", "label": "joint_pain", "shape": "dot", "title": "0", "value": 100}, {"color": "#4BD4FF", "font": {"color": "#ffffff"}, "id": "knee_pain", "label": "knee_pain", "shape": "dot", "title": "1", "value": 85}, {"color": "#3CDFCB", "font": {"color": "#ffffff"}, "id": "foot_pain", "label": "foot_pain", "shape": "dot", "title": "2", "value": 70}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_pain", "label": "hip_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_pain", "label": "shoulder_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "ankle_pain", "label": "ankle_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "neck_pain", "label": "neck_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "wrist_pain", "label": "wrist_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "forearm_pain", "label": "forearm_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "leg_pain", "label": "leg_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "foot_cramps", "label": "foot_cramps", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "legs_pain", "label": "legs_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "chest_pain", "label": "chest_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "elbow_pain", "label": "elbow_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "waist_pain", "label": "waist_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "finger_joint_pain", "label": "finger_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "toe_pain", "label": "toe_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "arm_pain", "label": "arm_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "thumb_pain", "label": "thumb_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "heel_pain", "label": "heel_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "head_pain", "label": "head_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knuckle_pain", "label": "knuckle_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "finger_pain", "label": "finger_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "foot_swelling", "label": "foot_swelling", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "feet_pain", "label": "feet_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "jaw_pain", "label": "jaw_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulders_pain", "label": "shoulders_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "thigh_pain", "label": "thigh_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "arms_pain", "label": "arms_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#3CDFCB", "font": {"color": "#ffffff"}, "id": "knee_joint_pain", "label": "knee_joint_pain", "shape": "dot", "title": "2", "value": 70}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_joints_pain", "label": "knee_joints_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "aching_joint_pain", "label": "aching_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_joint_pains", "label": "knee_joint_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_joint_pain", "label": "hip_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_ligament_pain", "label": "knee_ligament_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_muscle_pain", "label": "shoulder_muscle_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "wrist_joint_pain", "label": "wrist_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee__pain", "label": "knee__pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_joint_ache", "label": "knee_joint_ache", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_muscle_pain", "label": "joint_muscle_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "arthritic_joint_pain", "label": "arthritic_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "fingers_joint_pain", "label": "fingers_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "ankle_joint__pain", "label": "ankle_joint__pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_joint_aches", "label": "hip_joint_aches", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "elbow_joint_pains", "label": "elbow_joint_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knees_joint_pain", "label": "knees_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_joint_stiffness", "label": "knee_joint_stiffness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "arm_muscle_pain", "label": "arm_muscle_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_arm_pain", "label": "shoulder_arm_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "thumb_joint_pain", "label": "thumb_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_finger_pain", "label": "joint_finger_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_joints_pain", "label": "shoulder_joints_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_bone_joint_pain", "label": "shoulder_bone_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_knee_pain", "label": "hip_knee_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_joint_discomfort", "label": "hip_joint_discomfort", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee\njoint_pain", "label": "knee\njoint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "jaw_hindge_joint_pain", "label": "jaw_hindge_joint_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_joints_pain", "label": "hip_joints_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#3CDFCB", "font": {"color": "#ffffff"}, "id": "knee_pains", "label": "knee_pains", "shape": "dot", "title": "2", "value": 70}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_pains", "label": "joint_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "leg_cramps", "label": "leg_cramps", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_aches", "label": "knee_aches", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knees_pain", "label": "knees_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_pains", "label": "shoulder_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_aches", "label": "hip_aches", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "chest_pains", "label": "chest_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "leg_spasms", "label": "leg_spasms", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "leg_pains", "label": "leg_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hip_pains", "label": "hip_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_discomfort", "label": "knee_discomfort", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_cramps", "label": "knee_cramps", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "elbow_aches", "label": "elbow_aches", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_soreness", "label": "shoulder_soreness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "ankle_pains", "label": "ankle_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "feet_pains", "label": "feet_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "legs_pains", "label": "legs_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "leg_aches", "label": "leg_aches", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "neck_spasms", "label": "neck_spasms", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_swelling", "label": "knee_swelling", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "leg_numbness", "label": "leg_numbness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_cramps", "label": "joint_cramps", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "neck_pains", "label": "neck_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "tendon_pains", "label": "tendon_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knees_pains", "label": "knees_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_tendonitis", "label": "shoulder_tendonitis", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knees_joint_pains", "label": "knees_joint_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "head_pains", "label": "head_pains", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_aches", "label": "shoulder_aches", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "shoulder_discomfort", "label": "shoulder_discomfort", "shape": "dot", "title": "3", "value": 55}, {"color": "#3CDFCB", "font": {"color": "#ffffff"}, "id": "spine_pain", "label": "spine_pain", "shape": "dot", "title": "2", "value": 70}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joints_pain", "label": "joints_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "ligaments_pain", "label": "ligaments_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "bone_pain", "label": "bone_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "nerve_pain", "label": "nerve_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "limb_pain", "label": "limb_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "hips_pain", "label": "hips_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "vertebral_pain", "label": "vertebral_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "pelvic_pain", "label": "pelvic_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "spinal_pain", "label": "spinal_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "bony_pain", "label": "bony_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "ear_pain", "label": "ear_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "ligament_pain", "label": "ligament_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "abdomen_pain", "label": "abdomen_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "kneecap_pain", "label": "kneecap_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "groin_pain", "label": "groin_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "extremity_pain", "label": "extremity_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "tendon_pain", "label": "tendon_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "testicle_pain", "label": "testicle_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "tailbone_pain", "label": "tailbone_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "lumbar_pain", "label": "lumbar_pain", "shape": "dot", "title": "3", "value": 55}, {"color": "#4BD4FF", "font": {"color": "#ffffff"}, "id": "joint_swelling", "label": "joint_swelling", "shape": "dot", "title": "1", "value": 85}, {"color": "#3CDFCB", "font": {"color": "#ffffff"}, "id": "joint_stiffness", "label": "joint_stiffness", "shape": "dot", "title": "2", "value": 70}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_soreness", "label": "joint_soreness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_discomfort", "label": "joint_discomfort", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "knee_stiffness", "label": "knee_stiffness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_spasms", "label": "joint_spasms", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_weakness", "label": "joint_weakness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_tightness", "label": "joint_tightness", "shape": "dot", "title": "3", "value": 55}, {"color": "#37DF8E", "font": {"color": "#ffffff"}, "id": "joint_tenderness", "label": "joint_tenderness", "shape": "dot", "title": "3", "value": 55}]);
edges = new vis.DataSet([{"from": "joint_pain", "to": "knee_pain", "value": 1.0}, {"from": "knee_pain", "to": "foot_pain", "value": 0.85}, {"from": "foot_pain", "to": "hip_pain", "value": 0.7}, {"from": "foot_pain", "to": "shoulder_pain", "value": 0.7}, {"from": "foot_pain", "to": "ankle_pain", "value": 0.7}, {"from": "foot_pain", "to": "neck_pain", "value": 0.7}, {"from": "foot_pain", "to": "wrist_pain", "value": 0.7}, {"from": "foot_pain", "to": "forearm_pain", "value": 0.7}, {"from": "foot_pain", "to": "leg_pain", "value": 0.7}, {"from": "foot_pain", "to": "foot_cramps", "value": 0.7}, {"from": "foot_pain", "to": "legs_pain", "value": 0.7}, {"from": "foot_pain", "to": "chest_pain", "value": 0.7}, {"from": "foot_pain", "to": "elbow_pain", "value": 0.7}, {"from": "foot_pain", "to": "waist_pain", "value": 0.7}, {"from": "foot_pain", "to": "finger_joint_pain", "value": 0.7}, {"from": "foot_pain", "to": "toe_pain", "value": 0.7}, {"from": "foot_pain", "to": "arm_pain", "value": 0.7}, {"from": "foot_pain", "to": "thumb_pain", "value": 0.7}, {"from": "foot_pain", "to": "heel_pain", "value": 0.7}, {"from": "foot_pain", "to": "head_pain", "value": 0.7}, {"from": "foot_pain", "to": "knuckle_pain", "value": 0.7}, {"from": "foot_pain", "to": "finger_pain", "value": 0.7}, {"from": "foot_pain", "to": "foot_swelling", "value": 0.7}, {"from": "foot_pain", "to": "feet_pain", "value": 0.7}, {"from": "foot_pain", "to": "jaw_pain", "value": 0.7}, {"from": "foot_pain", "to": "shoulders_pain", "value": 0.7}, {"from": "foot_pain", "to": "thigh_pain", "value": 0.7}, {"from": "foot_pain", "to": "arms_pain", "value": 0.7}, {"from": "knee_pain", "to": "knee_joint_pain", "value": 0.85}, {"from": "knee_joint_pain", "to": "knee_joints_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "aching_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "knee_joint_pains", "value": 0.7}, {"from": "knee_joint_pain", "to": "hip_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "knee_ligament_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "shoulder_muscle_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "wrist_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "knee__pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "knee_joint_ache", "value": 0.7}, {"from": "knee_joint_pain", "to": "joint_muscle_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "arthritic_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "fingers_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "ankle_joint__pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "hip_joint_aches", "value": 0.7}, {"from": "knee_joint_pain", "to": "elbow_joint_pains", "value": 0.7}, {"from": "knee_joint_pain", "to": "knees_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "knee_joint_stiffness", "value": 0.7}, {"from": "knee_joint_pain", "to": "arm_muscle_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "shoulder_arm_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "thumb_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "joint_finger_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "shoulder_joints_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "shoulder_bone_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "hip_knee_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "hip_joint_discomfort", "value": 0.7}, {"from": "knee_joint_pain", "to": "knee\njoint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "jaw_hindge_joint_pain", "value": 0.7}, {"from": "knee_joint_pain", "to": "hip_joints_pain", "value": 0.7}, {"from": "knee_pain", "to": "knee_pains", "value": 0.85}, {"from": "knee_pains", "to": "joint_pains", "value": 0.7}, {"from": "knee_pains", "to": "leg_cramps", "value": 0.7}, {"from": "knee_pains", "to": "knee_aches", "value": 0.7}, {"from": "knee_pains", "to": "knees_pain", "value": 0.7}, {"from": "knee_pains", "to": "shoulder_pains", "value": 0.7}, {"from": "knee_pains", "to": "hip_aches", "value": 0.7}, {"from": "knee_pains", "to": "chest_pains", "value": 0.7}, {"from": "knee_pains", "to": "leg_spasms", "value": 0.7}, {"from": "knee_pains", "to": "leg_pains", "value": 0.7}, {"from": "knee_pains", "to": "hip_pains", "value": 0.7}, {"from": "knee_pains", "to": "knee_discomfort", "value": 0.7}, {"from": "knee_pains", "to": "knee_cramps", "value": 0.7}, {"from": "knee_pains", "to": "elbow_aches", "value": 0.7}, {"from": "knee_pains", "to": "shoulder_soreness", "value": 0.7}, {"from": "knee_pains", "to": "ankle_pains", "value": 0.7}, {"from": "knee_pains", "to": "feet_pains", "value": 0.7}, {"from": "knee_pains", "to": "legs_pains", "value": 0.7}, {"from": "knee_pains", "to": "leg_aches", "value": 0.7}, {"from": "knee_pains", "to": "neck_spasms", "value": 0.7}, {"from": "knee_pains", "to": "knee_swelling", "value": 0.7}, {"from": "knee_pains", "to": "leg_numbness", "value": 0.7}, {"from": "knee_pains", "to": "joint_cramps", "value": 0.7}, {"from": "knee_pains", "to": "neck_pains", "value": 0.7}, {"from": "knee_pains", "to": "tendon_pains", "value": 0.7}, {"from": "knee_pains", "to": "knees_pains", "value": 0.7}, {"from": "knee_pains", "to": "shoulder_tendonitis", "value": 0.7}, {"from": "knee_pains", "to": "knees_joint_pains", "value": 0.7}, {"from": "knee_pains", "to": "head_pains", "value": 0.7}, {"from": "knee_pains", "to": "shoulder_aches", "value": 0.7}, {"from": "knee_pains", "to": "shoulder_discomfort", "value": 0.7}, {"from": "knee_pain", "to": "spine_pain", "value": 0.85}, {"from": "spine_pain", "to": "joints_pain", "value": 0.7}, {"from": "spine_pain", "to": "ligaments_pain", "value": 0.7}, {"from": "spine_pain", "to": "bone_pain", "value": 0.7}, {"from": "spine_pain", "to": "nerve_pain", "value": 0.7}, {"from": "spine_pain", "to": "limb_pain", "value": 0.7}, {"from": "spine_pain", "to": "hips_pain", "value": 0.7}, {"from": "spine_pain", "to": "vertebral_pain", "value": 0.7}, {"from": "spine_pain", "to": "pelvic_pain", "value": 0.7}, {"from": "spine_pain", "to": "spinal_pain", "value": 0.7}, {"from": "spine_pain", "to": "bony_pain", "value": 0.7}, {"from": "spine_pain", "to": "ear_pain", "value": 0.7}, {"from": "spine_pain", "to": "ligament_pain", "value": 0.7}, {"from": "spine_pain", "to": "abdomen_pain", "value": 0.7}, {"from": "spine_pain", "to": "kneecap_pain", "value": 0.7}, {"from": "spine_pain", "to": "groin_pain", "value": 0.7}, {"from": "spine_pain", "to": "extremity_pain", "value": 0.7}, {"from": "spine_pain", "to": "tendon_pain", "value": 0.7}, {"from": "spine_pain", "to": "testicle_pain", "value": 0.7}, {"from": "spine_pain", "to": "tailbone_pain", "value": 0.7}, {"from": "spine_pain", "to": "lumbar_pain", "value": 0.7}, {"from": "joint_pain", "to": "joint_swelling", "value": 1.0}, {"from": "joint_swelling", "to": "joint_stiffness", "value": 0.85}, {"from": "joint_stiffness", "to": "joint_soreness", "value": 0.7}, {"from": "joint_stiffness", "to": "joint_discomfort", "value": 0.7}, {"from": "joint_stiffness", "to": "knee_stiffness", "value": 0.7}, {"from": "joint_stiffness", "to": "joint_spasms", "value": 0.7}, {"from": "joint_stiffness", "to": "joint_weakness", "value": 0.7}, {"from": "joint_stiffness", "to": "joint_tightness", "value": 0.7}, {"from": "joint_stiffness", "to": "joint_tenderness", "value": 0.7}]);
// adding nodes and edges to the graph
data = {nodes: nodes, edges: edges};
var options = {
"configure": {
"enabled": false
},
"edges": {
"color": {
"inherit": true
},
"smooth": {
"enabled": true,
"type": "dynamic"
}
},
"interaction": {
"dragNodes": true,
"hideEdgesOnDrag": false,
"hideNodesOnDrag": false
},
"physics": {
"barnesHut": {
"avoidOverlap": 0,
"centralGravity": 0.3,
"damping": 0.09,
"gravitationalConstant": -2738,
"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);
network.on("stabilizationProgress", function(params) {
document.getElementById('loadingBar').removeAttribute("style");
var maxWidth = 496;
var minWidth = 20;
var widthFactor = params.iterations/params.total;
var width = Math.max(minWidth,maxWidth * widthFactor);
document.getElementById('bar').style.width = width + 'px';
document.getElementById('text').innerHTML = Math.round(widthFactor*100) + '%';
});
network.once("stabilizationIterationsDone", function() {
document.getElementById('text').innerHTML = '100%';
document.getElementById('bar').style.width = '496px';
document.getElementById('loadingBar').style.opacity = 0;
// really clean the dom element
setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500);
});
return network;
}
drawGraph();
</script>
</body>
</html>