Browse Source

Merge remote-tracking branch 'origin/v4' into v4

flowchartTest
Alex de Mulder 9 years ago
parent
commit
315ad7cfda
6 changed files with 10217 additions and 30108 deletions
  1. +8
    -3
      examples/network/25_physics_configuration.html
  2. +46
    -20
      examples/network/26_staticSmoothCurves.html
  3. +114
    -10072
      examples/network/27_world_cup_network.html
  4. +71
    -10032
      examples/network/28_world_cup_network_performance.html
  5. +3
    -9981
      examples/network/29_neighbourhood_highlight.html
  6. +9975
    -0
      examples/network/data/WorldCup2014.js

+ 8
- 3
examples/network/25_physics_configuration.html View File

@ -78,8 +78,12 @@
}; };
var options = { var options = {
stabilize: false,
configurePhysics:true
physics: {
stabilization: false
},
configure: {
filter: 'physics'
}
}; };
network = new vis.Network(container, data, options); network = new vis.Network(container, data, options);
@ -89,7 +93,8 @@
}); });
} }
</script> </script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="draw();"> <body onload="draw();">

+ 46
- 20
examples/network/26_staticSmoothCurves.html View File

@ -13,7 +13,8 @@
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<script src="../googleAnalytics.js"></script>
</head>
<body> <body>
@ -30,8 +31,9 @@
<br /> <br /> <br /> <br />
</div> </div>
Smooth curve type:
<select id="dropdownID">
<p>
Smooth curve type:
<select id="dropdownID">
<option value="continuous" selected="selected">continuous</option> <option value="continuous" selected="selected">continuous</option>
<option value="discrete">discrete</option> <option value="discrete">discrete</option>
<option value="diagonalCross">diagonalCross</option> <option value="diagonalCross">diagonalCross</option>
@ -40,18 +42,22 @@ Smooth curve type:
<option value="vertical">vertical</option> <option value="vertical">vertical</option>
<option value="curvedCW">curvedCW</option> <option value="curvedCW">curvedCW</option>
<option value="curvedCCW">curvedCCW</option> <option value="curvedCCW">curvedCCW</option>
</select><br/>
Roundness (0..1): <input type="range" min="0" max="1" value="0.5" step="0.05" style="width:200px" id="roundnessSlider"> <input id="roundnessScreen" value="0.5"> (0.5 is max roundness for continuous, 1.0 for the others)
</select>
</p>
<p>
Roundness (0..1): <input type="range" min="0" max="1" value="0.5" step="0.05" style="width:200px" id="roundnessSlider"> <input id="roundnessScreen" value="0.5"> (0.5 is max roundness for continuous, 1.0 for the others)
</p>
<div id="mynetwork"></div> <div id="mynetwork"></div>
<script type="text/javascript"> <script type="text/javascript">
var dropdown = document.getElementById("dropdownID");
dropdown.onchange = update;
var roundnessSlider = document.getElementById("roundnessSlider");
roundnessSlider.onchange = update;
var dropdown = document.getElementById("dropdownID");
dropdown.onchange = update;
var roundnessSlider = document.getElementById("roundnessSlider");
roundnessSlider.onchange = update;
var roundnessScreen = document.getElementById("roundnessScreen");
var roundnessScreen = document.getElementById("roundnessScreen");
// create an array with nodes // create an array with nodes
var nodes = [ var nodes = [
{id: 1, label: 'Node 1'}, {id: 1, label: 'Node 1'},
@ -69,20 +75,40 @@ var roundnessScreen = document.getElementById("roundnessScreen");
nodes: nodes, nodes: nodes,
edges: edges edges: edges
}; };
var options = {physics:{barnesHut:{gravitationalConstant:0, springConstant:0, centralGravity: 0}},
smoothCurves:{dynamic:false, type: '1'}};
var options = {
physics:{
barnesHut: {
gravitationalConstant:0,
springConstant:0,
centralGravity: 0
}
},
edges: {
smooth: {
dynamic: false,
type: '1'
}
}
};
var network = new vis.Network(container, data, options); var network = new vis.Network(container, data, options);
function update() {
var type = dropdown.value;
var roundness = roundnessSlider.value;
roundnessScreen.value = roundness;
var options = {smoothCurves:{type:type, roundness:roundness}}
function update() {
var type = dropdown.value;
var roundness = parseFloat(roundnessSlider.value);
roundnessScreen.value = roundness;
var options = {
edges: {
smooth: {
type: type,
roundness: roundness
}
}
};
network.setOptions(options);
}
network.setOptions(options);
}
update();
update();
</script> </script>
</body> </body>

+ 114
- 10072
examples/network/27_world_cup_network.html
File diff suppressed because it is too large
View File


+ 71
- 10032
examples/network/28_world_cup_network_performance.html
File diff suppressed because it is too large
View File


+ 3
- 9981
examples/network/29_neighbourhood_highlight.html
File diff suppressed because it is too large
View File


+ 9975
- 0
examples/network/data/WorldCup2014.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save