|
@ -15,11 +15,11 @@ |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|
|
|
|
|
|
<script src="http://visjs.org/dist/vis.js" type="text/javascript" ></script> |
|
|
|
|
|
<link href="http://visjs.org/dist/vis.css" rel="stylesheet" type="text/css"/> |
|
|
|
|
|
<!--<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />--> |
|
|
|
|
|
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>--> |
|
|
|
|
|
<!--<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" type="text/javascript"></script>--> |
|
|
|
|
|
|
|
|
<script src="../dist/vis.js" type="text/javascript" ></script> |
|
|
|
|
|
<link href="../dist/vis.css" rel="stylesheet" type="text/css"/> |
|
|
|
|
|
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
|
|
|
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
|
|
|
|
|
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" type="text/javascript"></script> |
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
|
var network = null; |
|
|
var network = null; |
|
@ -48,32 +48,31 @@ |
|
|
}; |
|
|
}; |
|
|
network = new vis.Network(container, data, options); |
|
|
network = new vis.Network(container, data, options); |
|
|
|
|
|
|
|
|
// $('#divTreemapPopUp').modal('show'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var nodes2 = []; |
|
|
|
|
|
var edges2 = []; |
|
|
|
|
|
nodes2.push({ id: 1, label: 'Node1' }); |
|
|
|
|
|
nodes2.push({ id: 2, label: 'Node2' }); |
|
|
|
|
|
edges2.push({ from: 2, to: 1 }); |
|
|
|
|
|
|
|
|
|
|
|
var data2 = { |
|
|
|
|
|
nodes: nodes2, |
|
|
|
|
|
edges: edges2 |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// create a network |
|
|
|
|
|
var container2 = document.getElementById('mynetwork2'); |
|
|
|
|
|
var options2 = { |
|
|
|
|
|
layout: { |
|
|
|
|
|
hierarchical: { |
|
|
|
|
|
direction: "UD" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
network2 = new vis.Network(container2, data2, options2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#divTreemapPopUp').modal('show'); |
|
|
|
|
|
|
|
|
|
|
|
// |
|
|
|
|
|
// var nodes2 = []; |
|
|
|
|
|
// var edges2 = []; |
|
|
|
|
|
// nodes2.push({ id: 1, label: 'Node1' }); |
|
|
|
|
|
// nodes2.push({ id: 2, label: 'Node2' }); |
|
|
|
|
|
// edges2.push({ from: 2, to: 1 }); |
|
|
|
|
|
// |
|
|
|
|
|
// var data2 = { |
|
|
|
|
|
// nodes: nodes2, |
|
|
|
|
|
// edges: edges2 |
|
|
|
|
|
// }; |
|
|
|
|
|
// |
|
|
|
|
|
// // create a network |
|
|
|
|
|
// var container2 = document.getElementById('mynetwork2'); |
|
|
|
|
|
// var options2 = { |
|
|
|
|
|
// layout: { |
|
|
|
|
|
// hierarchical: { |
|
|
|
|
|
// direction: "UD" |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }; |
|
|
|
|
|
// network2 = new vis.Network(container2, data2, options2); |
|
|
|
|
|
// setTimeout(function() {console.log('redraw');network.redraw()},1000) |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
</head> |
|
|
</head> |
|
@ -81,7 +80,7 @@ |
|
|
<body onload="draw();"> |
|
|
<body onload="draw();"> |
|
|
<h2>Popup Example</h2> |
|
|
<h2>Popup Example</h2> |
|
|
|
|
|
|
|
|
<div style='display: block;' class='modal fade' id='divTreemapPopUp' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'> |
|
|
|
|
|
|
|
|
<div style='display: none;' class='modal fade' id='divTreemapPopUp' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'> |
|
|
<div class='modal-dialog'><div class='modal-content'><div class='modal-header'> |
|
|
<div class='modal-dialog'><div class='modal-content'><div class='modal-header'> |
|
|
<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> |
|
|
<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> |
|
|
<h4 class='modal-title'>TreeMap</h4></div> |
|
|
<h4 class='modal-title'>TreeMap</h4></div> |
|
|