diff --git a/examples/googleAnalytics.js b/examples/googleAnalytics.js new file mode 100644 index 00000000..106072a0 --- /dev/null +++ b/examples/googleAnalytics.js @@ -0,0 +1,12 @@ +(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'); \ No newline at end of file diff --git a/examples/network/01_basic_usage.html b/examples/network/01_basic_usage.html index a0be8eb6..fff868ee 100644 --- a/examples/network/01_basic_usage.html +++ b/examples/network/01_basic_usage.html @@ -13,26 +13,29 @@ border: 1px solid lightgray; } + +

+ Create a simple network with some nodes and edges. +

+
-
-var options = {
-  manipulation: 'hello',
-  physics:{barnesHut:{gravitationslPull:34}, solver:'banana'},
-  groups:{'bla':{color:{backsground:'red'}, borderWidth:5}}
-}
-  
+ + diff --git a/examples/network/02_random_nodes.html b/examples/network/02_random_nodes.html index a490ad60..b6209d0d 100644 --- a/examples/network/02_random_nodes.html +++ b/examples/network/02_random_nodes.html @@ -84,37 +84,27 @@ nodes: nodes, edges: edges }; - var options = {physics:{stabilization:false}}; + var options = { + physics: { stabilization: false } + }; network = new vis.Network(container, data, options); - - // add event listeners -// network.on('select', function(params) { -// document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes; -// }); -// network.on('stabilized', function (params) { -// document.getElementById('stabilization').innerHTML = 'Stabilization took ' + params.iterations + ' iterations.'; -// }); -// network.on('startStabilization', function (params) { -// document.getElementById('stabilization').innerHTML = 'Stabilizing...'; -// }); - -// setTimeout(destroy,500); } - + - - - - -
+

+ Generate a random network with nodes and edges. +

+

+ + + +

-

-

diff --git a/examples/network/03_images.html b/examples/network/03_images.html index 162aa7ae..b9428d75 100644 --- a/examples/network/03_images.html +++ b/examples/network/03_images.html @@ -4,9 +4,6 @@ Network | Images @@ -137,23 +137,31 @@ var options = { nodes: { shape: 'dot', - radius:30, - font:{color:'#ffffff'}, - borderWidth:2 + size: 30, + font: { + size: 32, + color: '#ffffff' + }, + borderWidth: 2 + }, + edges : { + width: 2 } }; network = new vis.Network(container, data, options); } - + + +

+ Apply styling to groups of nodes. +

- Number of groups: - - Number of nodes per group: - + Number of groups: + Number of nodes per group:

diff --git a/examples/network/07_selections.html b/examples/network/07_selections.html index ebf495a5..9f74849b 100644 --- a/examples/network/07_selections.html +++ b/examples/network/07_selections.html @@ -13,12 +13,15 @@ border: 1px solid lightgray; } - - + + +

+ Select nodes or edges by clicking them. To select multiple nodes, long-press (hold) them. +

-
+

 
 
-  
-
-  
-
-
-
-
- - diff --git a/examples/network/12_scalable_images.html b/examples/network/09_scaling.html similarity index 80% rename from examples/network/12_scalable_images.html rename to examples/network/09_scaling.html index 4b694909..411859d3 100644 --- a/examples/network/12_scalable_images.html +++ b/examples/network/09_scaling.html @@ -1,10 +1,10 @@ - Network | Scalable images + Network | Sizing - - - - - - - - -
- - diff --git a/examples/network/10_multiline_text.html b/examples/network/10_multiline_text.html index 18efb761..7d755b44 100644 --- a/examples/network/10_multiline_text.html +++ b/examples/network/10_multiline_text.html @@ -1,4 +1,4 @@ - + Network | Multiline text @@ -43,7 +43,8 @@ var network = new vis.Network(container, data, options); } - + +
diff --git a/examples/network/11_custom_style.html b/examples/network/11_styling.html similarity index 75% rename from examples/network/11_custom_style.html rename to examples/network/11_styling.html index 13c2e8f7..adcb7a10 100644 --- a/examples/network/11_custom_style.html +++ b/examples/network/11_styling.html @@ -1,12 +1,9 @@ - + Network | Custom style