From 7b3fc2fd2cb5ca987e9be5df33b942fda3b78254 Mon Sep 17 00:00:00 2001 From: Rene Heindl Date: Mon, 16 Feb 2015 14:00:47 +0100 Subject: [PATCH] Updated Examples --- examples/network/38_node_as_icon.html | 263 ++++++++++++++++---------- 1 file changed, 159 insertions(+), 104 deletions(-) diff --git a/examples/network/38_node_as_icon.html b/examples/network/38_node_as_icon.html index 5cbbb2aa..9c117651 100644 --- a/examples/network/38_node_as_icon.html +++ b/examples/network/38_node_as_icon.html @@ -1,113 +1,168 @@ - + -
- -Network | node as icon - - - + + + Network | node as icon - - -
+ + + + + + + -

Use FontAwesome-icons for node

-
-

Use Ionicons-icons for node

-
- - + }; + + // create an array with nodes + var nodesIO = [{ + id: 1, + label: 'User 1', + group: 'users' + }, { + id: 2, + label: 'User 2', + group: 'users' + }, { + id: 3, + label: 'Usergroup 1', + group: 'usergroups' + }, { + id: 4, + label: 'Usergroup 2', + group: 'usergroups' + }, { + id: 5, + label: 'Organisation 1', + shape: 'icon', + iconFontFace: 'Ionicons', + icon: '\uf276', + iconSize: 50, + iconColor: '#f0a30a' + }]; + + // create a network + var containerIO = document.getElementById('mynetworkIO'); + var dataIO = { + nodes: nodesIO, + edges: edges + }; + + var networkIO = new vis.Network(containerIO, dataIO, optionsIO); + }) + - \ No newline at end of file + +