vis.js is a dynamic, browser-based visualization library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

373 lines
20 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title>Graph | Multiline text</title>
  5. <style type="text/css">
  6. #mygraph {
  7. width: 900px;
  8. height: 900px;
  9. border: 1px solid lightgray;
  10. }
  11. </style>
  12. <script type="text/javascript" src="../../dist/vis.js"></script>
  13. <script type="text/javascript">
  14. function draw() {
  15. // create some nodes
  16. var nodes = [
  17. {id:0,"labelIGNORE":"Myriel","group":1},
  18. {id:1,"labelIGNORE":"Napoleon","group":1},
  19. {id:2,"labelIGNORE":"Mlle.Baptistine","group":1},
  20. {id:3,"labelIGNORE":"Mme.Magloire","group":1},
  21. {id:4,"labelIGNORE":"CountessdeLo","group":1},
  22. {id:5,"labelIGNORE":"Geborand","group":1},
  23. {id:6,"labelIGNORE":"Champtercier","group":1},
  24. {id:7,"labelIGNORE":"Cravatte","group":1},
  25. {id:8,"labelIGNORE":"Count","group":1},
  26. {id:9,"labelIGNORE":"OldMan","group":1},
  27. {id:10,"labelIGNORE":"Labarre","group":2},
  28. {id:11,"labelIGNORE":"Valjean","group":2},
  29. {id:12,"labelIGNORE":"Marguerite","group":3},
  30. {id:13,"labelIGNORE":"Mme.deR","group":2},
  31. {id:14,"labelIGNORE":"Isabeau","group":2},
  32. {id:15,"labelIGNORE":"Gervais","group":2},
  33. {id:16,"labelIGNORE":"Tholomyes","group":3},
  34. {id:17,"labelIGNORE":"Listolier","group":3},
  35. {id:18,"labelIGNORE":"Fameuil","group":3},
  36. {id:19,"labelIGNORE":"Blacheville","group":3},
  37. {id:20,"labelIGNORE":"Favourite","group":3},
  38. {id:21,"labelIGNORE":"Dahlia","group":3},
  39. {id:22,"labelIGNORE":"Zephine","group":3},
  40. {id:23,"labelIGNORE":"Fantine","group":3},
  41. {id:24,"labelIGNORE":"Mme.Thenardier","group":4},
  42. {id:25,"labelIGNORE":"Thenardier","group":4},
  43. {id:26,"labelIGNORE":"Cosette","group":5},
  44. {id:27,"labelIGNORE":"Javert","group":4},
  45. {id:28,"labelIGNORE":"Fauchelevent","group":0},
  46. {id:29,"labelIGNORE":"Bamatabois","group":2},
  47. {id:30,"labelIGNORE":"Perpetue","group":3},
  48. {id:31,"labelIGNORE":"Simplice","group":2},
  49. {id:32,"labelIGNORE":"Scaufflaire","group":2},
  50. {id:33,"labelIGNORE":"Woman1","group":2},
  51. {id:34,"labelIGNORE":"Judge","group":2},
  52. {id:35,"labelIGNORE":"Champmathieu","group":2},
  53. {id:36,"labelIGNORE":"Brevet","group":2},
  54. {id:37,"labelIGNORE":"Chenildieu","group":2},
  55. {id:38,"labelIGNORE":"Cochepaille","group":2},
  56. {id:39,"labelIGNORE":"Pontmercy","group":4},
  57. {id:40,"labelIGNORE":"Boulatruelle","group":6},
  58. {id:41,"labelIGNORE":"Eponine","group":4},
  59. {id:42,"labelIGNORE":"Anzelma","group":4},
  60. {id:43,"labelIGNORE":"Woman2","group":5},
  61. {id:44,"labelIGNORE":"MotherInnocent","group":0},
  62. {id:45,"labelIGNORE":"Gribier","group":0},
  63. {id:46,"labelIGNORE":"Jondrette","group":7},
  64. {id:47,"labelIGNORE":"Mme.Burgon","group":7},
  65. {id:48,"labelIGNORE":"Gavroche","group":8},
  66. {id:49,"labelIGNORE":"Gillenormand","group":5},
  67. {id:50,"labelIGNORE":"Magnon","group":5},
  68. {id:51,"labelIGNORE":"Mlle.Gillenormand","group":5},
  69. {id:52,"labelIGNORE":"Mme.Pontmercy","group":5},
  70. {id:53,"labelIGNORE":"Mlle.Vaubois","group":5},
  71. {id:54,"labelIGNORE":"Lt.Gillenormand","group":5},
  72. {id:55,"labelIGNORE":"Marius","group":8},
  73. {id:56,"labelIGNORE":"BaronessT","group":5},
  74. {id:57,"labelIGNORE":"Mabeuf","group":8},
  75. {id:58,"labelIGNORE":"Enjolras","group":8},
  76. {id:59,"labelIGNORE":"Combeferre","group":8},
  77. {id:60,"labelIGNORE":"Prouvaire","group":8},
  78. {id:61,"labelIGNORE":"Feuilly","group":8},
  79. {id:62,"labelIGNORE":"Courfeyrac","group":8},
  80. {id:63,"labelIGNORE":"Bahorel","group":8},
  81. {id:64,"labelIGNORE":"Bossuet","group":8},
  82. {id:65,"labelIGNORE":"Joly","group":8},
  83. {id:66,"labelIGNORE":"Grantaire","group":8},
  84. {id:67,"labelIGNORE":"MotherPlutarch","group":9},
  85. {id:68,"labelIGNORE":"Gueulemer","group":4},
  86. {id:69,"labelIGNORE":"Babet","group":4},
  87. {id:70,"labelIGNORE":"Claquesous","group":4},
  88. {id:71,"labelIGNORE":"Montparnasse","group":4},
  89. {id:72,"labelIGNORE":"Toussaint","group":5},
  90. {id:73,"labelIGNORE":"Child1","group":10},
  91. {id:74,"labelIGNORE":"Child2","group":10},
  92. {id:75,"labelIGNORE":"Brujon","group":4},
  93. {id:76,"labelIGNORE":"Mme.Hucheloup","group":8}
  94. ];
  95. // create some edges
  96. var edges = [
  97. {"from":1,"to":0,"valueIGNORED":1},
  98. {"from":2,"to":0,"valueIGNORED":8},
  99. {"from":3,"to":0,"valueIGNORED":10},
  100. {"from":3,"to":2,"valueIGNORED":6},
  101. {"from":4,"to":0,"valueIGNORED":1},
  102. {"from":5,"to":0,"valueIGNORED":1},
  103. {"from":6,"to":0,"valueIGNORED":1},
  104. {"from":7,"to":0,"valueIGNORED":1},
  105. {"from":8,"to":0,"valueIGNORED":2},
  106. {"from":9,"to":0,"valueIGNORED":1},
  107. {"from":11,"to":10,"valueIGNORED":1},
  108. {"from":11,"to":3,"valueIGNORED":3},
  109. {"from":11,"to":2,"valueIGNORED":3},
  110. {"from":11,"to":0,"valueIGNORED":5},
  111. {"from":12,"to":11,"valueIGNORED":1},
  112. {"from":13,"to":11,"valueIGNORED":1},
  113. {"from":14,"to":11,"valueIGNORED":1},
  114. {"from":15,"to":11,"valueIGNORED":1},
  115. {"from":17,"to":16,"valueIGNORED":4},
  116. {"from":18,"to":16,"valueIGNORED":4},
  117. {"from":18,"to":17,"valueIGNORED":4},
  118. {"from":19,"to":16,"valueIGNORED":4},
  119. {"from":19,"to":17,"valueIGNORED":4},
  120. {"from":19,"to":18,"valueIGNORED":4},
  121. {"from":20,"to":16,"valueIGNORED":3},
  122. {"from":20,"to":17,"valueIGNORED":3},
  123. {"from":20,"to":18,"valueIGNORED":3},
  124. {"from":20,"to":19,"valueIGNORED":4},
  125. {"from":21,"to":16,"valueIGNORED":3},
  126. {"from":21,"to":17,"valueIGNORED":3},
  127. {"from":21,"to":18,"valueIGNORED":3},
  128. {"from":21,"to":19,"valueIGNORED":3},
  129. {"from":21,"to":20,"valueIGNORED":5},
  130. {"from":22,"to":16,"valueIGNORED":3},
  131. {"from":22,"to":17,"valueIGNORED":3},
  132. {"from":22,"to":18,"valueIGNORED":3},
  133. {"from":22,"to":19,"valueIGNORED":3},
  134. {"from":22,"to":20,"valueIGNORED":4},
  135. {"from":22,"to":21,"valueIGNORED":4},
  136. {"from":23,"to":16,"valueIGNORED":3},
  137. {"from":23,"to":17,"valueIGNORED":3},
  138. {"from":23,"to":18,"valueIGNORED":3},
  139. {"from":23,"to":19,"valueIGNORED":3},
  140. {"from":23,"to":20,"valueIGNORED":4},
  141. {"from":23,"to":21,"valueIGNORED":4},
  142. {"from":23,"to":22,"valueIGNORED":4},
  143. {"from":23,"to":12,"valueIGNORED":2},
  144. {"from":23,"to":11,"valueIGNORED":9},
  145. {"from":24,"to":23,"valueIGNORED":2},
  146. {"from":24,"to":11,"valueIGNORED":7},
  147. {"from":25,"to":24,"valueIGNORED":13},
  148. {"from":25,"to":23,"valueIGNORED":1},
  149. {"from":25,"to":11,"valueIGNORED":12},
  150. {"from":26,"to":24,"valueIGNORED":4},
  151. {"from":26,"to":11,"valueIGNORED":31},
  152. {"from":26,"to":16,"valueIGNORED":1},
  153. {"from":26,"to":25,"valueIGNORED":1},
  154. {"from":27,"to":11,"valueIGNORED":17},
  155. {"from":27,"to":23,"valueIGNORED":5},
  156. {"from":27,"to":25,"valueIGNORED":5},
  157. {"from":27,"to":24,"valueIGNORED":1},
  158. {"from":27,"to":26,"valueIGNORED":1},
  159. {"from":28,"to":11,"valueIGNORED":8},
  160. {"from":28,"to":27,"valueIGNORED":1},
  161. {"from":29,"to":23,"valueIGNORED":1},
  162. {"from":29,"to":27,"valueIGNORED":1},
  163. {"from":29,"to":11,"valueIGNORED":2},
  164. {"from":30,"to":23,"valueIGNORED":1},
  165. {"from":31,"to":30,"valueIGNORED":2},
  166. {"from":31,"to":11,"valueIGNORED":3},
  167. {"from":31,"to":23,"valueIGNORED":2},
  168. {"from":31,"to":27,"valueIGNORED":1},
  169. {"from":32,"to":11,"valueIGNORED":1},
  170. {"from":33,"to":11,"valueIGNORED":2},
  171. {"from":33,"to":27,"valueIGNORED":1},
  172. {"from":34,"to":11,"valueIGNORED":3},
  173. {"from":34,"to":29,"valueIGNORED":2},
  174. {"from":35,"to":11,"valueIGNORED":3},
  175. {"from":35,"to":34,"valueIGNORED":3},
  176. {"from":35,"to":29,"valueIGNORED":2},
  177. {"from":36,"to":34,"valueIGNORED":2},
  178. {"from":36,"to":35,"valueIGNORED":2},
  179. {"from":36,"to":11,"valueIGNORED":2},
  180. {"from":36,"to":29,"valueIGNORED":1},
  181. {"from":37,"to":34,"valueIGNORED":2},
  182. {"from":37,"to":35,"valueIGNORED":2},
  183. {"from":37,"to":36,"valueIGNORED":2},
  184. {"from":37,"to":11,"valueIGNORED":2},
  185. {"from":37,"to":29,"valueIGNORED":1},
  186. {"from":38,"to":34,"valueIGNORED":2},
  187. {"from":38,"to":35,"valueIGNORED":2},
  188. {"from":38,"to":36,"valueIGNORED":2},
  189. {"from":38,"to":37,"valueIGNORED":2},
  190. {"from":38,"to":11,"valueIGNORED":2},
  191. {"from":38,"to":29,"valueIGNORED":1},
  192. {"from":39,"to":25,"valueIGNORED":1},
  193. {"from":40,"to":25,"valueIGNORED":1},
  194. {"from":41,"to":24,"valueIGNORED":2},
  195. {"from":41,"to":25,"valueIGNORED":3},
  196. {"from":42,"to":41,"valueIGNORED":2},
  197. {"from":42,"to":25,"valueIGNORED":2},
  198. {"from":42,"to":24,"valueIGNORED":1},
  199. {"from":43,"to":11,"valueIGNORED":3},
  200. {"from":43,"to":26,"valueIGNORED":1},
  201. {"from":43,"to":27,"valueIGNORED":1},
  202. {"from":44,"to":28,"valueIGNORED":3},
  203. {"from":44,"to":11,"valueIGNORED":1},
  204. {"from":45,"to":28,"valueIGNORED":2},
  205. {"from":47,"to":46,"valueIGNORED":1},
  206. {"from":48,"to":47,"valueIGNORED":2},
  207. {"from":48,"to":25,"valueIGNORED":1},
  208. {"from":48,"to":27,"valueIGNORED":1},
  209. {"from":48,"to":11,"valueIGNORED":1},
  210. {"from":49,"to":26,"valueIGNORED":3},
  211. {"from":49,"to":11,"valueIGNORED":2},
  212. {"from":50,"to":49,"valueIGNORED":1},
  213. {"from":50,"to":24,"valueIGNORED":1},
  214. {"from":51,"to":49,"valueIGNORED":9},
  215. {"from":51,"to":26,"valueIGNORED":2},
  216. {"from":51,"to":11,"valueIGNORED":2},
  217. {"from":52,"to":51,"valueIGNORED":1},
  218. {"from":52,"to":39,"valueIGNORED":1},
  219. {"from":53,"to":51,"valueIGNORED":1},
  220. {"from":54,"to":51,"valueIGNORED":2},
  221. {"from":54,"to":49,"valueIGNORED":1},
  222. {"from":54,"to":26,"valueIGNORED":1},
  223. {"from":55,"to":51,"valueIGNORED":6},
  224. {"from":55,"to":49,"valueIGNORED":12},
  225. {"from":55,"to":39,"valueIGNORED":1},
  226. {"from":55,"to":54,"valueIGNORED":1},
  227. {"from":55,"to":26,"valueIGNORED":21},
  228. {"from":55,"to":11,"valueIGNORED":19},
  229. {"from":55,"to":16,"valueIGNORED":1},
  230. {"from":55,"to":25,"valueIGNORED":2},
  231. {"from":55,"to":41,"valueIGNORED":5},
  232. {"from":55,"to":48,"valueIGNORED":4},
  233. {"from":56,"to":49,"valueIGNORED":1},
  234. {"from":56,"to":55,"valueIGNORED":1},
  235. {"from":57,"to":55,"valueIGNORED":1},
  236. {"from":57,"to":41,"valueIGNORED":1},
  237. {"from":57,"to":48,"valueIGNORED":1},
  238. {"from":58,"to":55,"valueIGNORED":7},
  239. {"from":58,"to":48,"valueIGNORED":7},
  240. {"from":58,"to":27,"valueIGNORED":6},
  241. {"from":58,"to":57,"valueIGNORED":1},
  242. {"from":58,"to":11,"valueIGNORED":4},
  243. {"from":59,"to":58,"valueIGNORED":15},
  244. {"from":59,"to":55,"valueIGNORED":5},
  245. {"from":59,"to":48,"valueIGNORED":6},
  246. {"from":59,"to":57,"valueIGNORED":2},
  247. {"from":60,"to":48,"valueIGNORED":1},
  248. {"from":60,"to":58,"valueIGNORED":4},
  249. {"from":60,"to":59,"valueIGNORED":2},
  250. {"from":61,"to":48,"valueIGNORED":2},
  251. {"from":61,"to":58,"valueIGNORED":6},
  252. {"from":61,"to":60,"valueIGNORED":2},
  253. {"from":61,"to":59,"valueIGNORED":5},
  254. {"from":61,"to":57,"valueIGNORED":1},
  255. {"from":61,"to":55,"valueIGNORED":1},
  256. {"from":62,"to":55,"valueIGNORED":9},
  257. {"from":62,"to":58,"valueIGNORED":17},
  258. {"from":62,"to":59,"valueIGNORED":13},
  259. {"from":62,"to":48,"valueIGNORED":7},
  260. {"from":62,"to":57,"valueIGNORED":2},
  261. {"from":62,"to":41,"valueIGNORED":1},
  262. {"from":62,"to":61,"valueIGNORED":6},
  263. {"from":62,"to":60,"valueIGNORED":3},
  264. {"from":63,"to":59,"valueIGNORED":5},
  265. {"from":63,"to":48,"valueIGNORED":5},
  266. {"from":63,"to":62,"valueIGNORED":6},
  267. {"from":63,"to":57,"valueIGNORED":2},
  268. {"from":63,"to":58,"valueIGNORED":4},
  269. {"from":63,"to":61,"valueIGNORED":3},
  270. {"from":63,"to":60,"valueIGNORED":2},
  271. {"from":63,"to":55,"valueIGNORED":1},
  272. {"from":64,"to":55,"valueIGNORED":5},
  273. {"from":64,"to":62,"valueIGNORED":12},
  274. {"from":64,"to":48,"valueIGNORED":5},
  275. {"from":64,"to":63,"valueIGNORED":4},
  276. {"from":64,"to":58,"valueIGNORED":10},
  277. {"from":64,"to":61,"valueIGNORED":6},
  278. {"from":64,"to":60,"valueIGNORED":2},
  279. {"from":64,"to":59,"valueIGNORED":9},
  280. {"from":64,"to":57,"valueIGNORED":1},
  281. {"from":64,"to":11,"valueIGNORED":1},
  282. {"from":65,"to":63,"valueIGNORED":5},
  283. {"from":65,"to":64,"valueIGNORED":7},
  284. {"from":65,"to":48,"valueIGNORED":3},
  285. {"from":65,"to":62,"valueIGNORED":5},
  286. {"from":65,"to":58,"valueIGNORED":5},
  287. {"from":65,"to":61,"valueIGNORED":5},
  288. {"from":65,"to":60,"valueIGNORED":2},
  289. {"from":65,"to":59,"valueIGNORED":5},
  290. {"from":65,"to":57,"valueIGNORED":1},
  291. {"from":65,"to":55,"valueIGNORED":2},
  292. {"from":66,"to":64,"valueIGNORED":3},
  293. {"from":66,"to":58,"valueIGNORED":3},
  294. {"from":66,"to":59,"valueIGNORED":1},
  295. {"from":66,"to":62,"valueIGNORED":2},
  296. {"from":66,"to":65,"valueIGNORED":2},
  297. {"from":66,"to":48,"valueIGNORED":1},
  298. {"from":66,"to":63,"valueIGNORED":1},
  299. {"from":66,"to":61,"valueIGNORED":1},
  300. {"from":66,"to":60,"valueIGNORED":1},
  301. {"from":67,"to":57,"valueIGNORED":3},
  302. {"from":68,"to":25,"valueIGNORED":5},
  303. {"from":68,"to":11,"valueIGNORED":1},
  304. {"from":68,"to":24,"valueIGNORED":1},
  305. {"from":68,"to":27,"valueIGNORED":1},
  306. {"from":68,"to":48,"valueIGNORED":1},
  307. {"from":68,"to":41,"valueIGNORED":1},
  308. {"from":69,"to":25,"valueIGNORED":6},
  309. {"from":69,"to":68,"valueIGNORED":6},
  310. {"from":69,"to":11,"valueIGNORED":1},
  311. {"from":69,"to":24,"valueIGNORED":1},
  312. {"from":69,"to":27,"valueIGNORED":2},
  313. {"from":69,"to":48,"valueIGNORED":1},
  314. {"from":69,"to":41,"valueIGNORED":1},
  315. {"from":70,"to":25,"valueIGNORED":4},
  316. {"from":70,"to":69,"valueIGNORED":4},
  317. {"from":70,"to":68,"valueIGNORED":4},
  318. {"from":70,"to":11,"valueIGNORED":1},
  319. {"from":70,"to":24,"valueIGNORED":1},
  320. {"from":70,"to":27,"valueIGNORED":1},
  321. {"from":70,"to":41,"valueIGNORED":1},
  322. {"from":70,"to":58,"valueIGNORED":1},
  323. {"from":71,"to":27,"valueIGNORED":1},
  324. {"from":71,"to":69,"valueIGNORED":2},
  325. {"from":71,"to":68,"valueIGNORED":2},
  326. {"from":71,"to":70,"valueIGNORED":2},
  327. {"from":71,"to":11,"valueIGNORED":1},
  328. {"from":71,"to":48,"valueIGNORED":1},
  329. {"from":71,"to":41,"valueIGNORED":1},
  330. {"from":71,"to":25,"valueIGNORED":1},
  331. {"from":72,"to":26,"valueIGNORED":2},
  332. {"from":72,"to":27,"valueIGNORED":1},
  333. {"from":72,"to":11,"valueIGNORED":1},
  334. {"from":73,"to":48,"valueIGNORED":2},
  335. {"from":74,"to":48,"valueIGNORED":2},
  336. {"from":74,"to":73,"valueIGNORED":3},
  337. {"from":75,"to":69,"valueIGNORED":3},
  338. {"from":75,"to":68,"valueIGNORED":3},
  339. {"from":75,"to":25,"valueIGNORED":3},
  340. {"from":75,"to":48,"valueIGNORED":1},
  341. {"from":75,"to":41,"valueIGNORED":1},
  342. {"from":75,"to":70,"valueIGNORED":1},
  343. {"from":75,"to":71,"valueIGNORED":1},
  344. {"from":76,"to":64,"valueIGNORED":1},
  345. {"from":76,"to":65,"valueIGNORED":1},
  346. {"from":76,"to":66,"valueIGNORED":1},
  347. {"from":76,"to":63,"valueIGNORED":1},
  348. {"from":76,"to":62,"valueIGNORED":1},
  349. {"from":76,"to":48,"valueIGNORED":1},
  350. {"from":76,"to":58,"valueIGNORED":1}
  351. ];
  352. // create a graph
  353. var container = document.getElementById('mygraph');
  354. var data = {
  355. nodes: nodes,
  356. edges: edges
  357. };
  358. var options = {stabilize: false};
  359. var graph = new vis.Graph(container, data, options);
  360. }
  361. </script>
  362. </head>
  363. <body onload="draw()">
  364. <div id="mygraph"></div>
  365. </body>
  366. </html>