twitter-trolls.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <html>
  2. <head>
  3. <title>DataViz</title>
  4. <style type="text/css">
  5. #viz {
  6. width: 900px;
  7. height: 700px;
  8. }
  9. </style>
  10. <script src="../dist/neovis.js"></script>
  11. </head>
  12. <script>
  13. function draw() {
  14. var config = {
  15. container_id: "viz",
  16. server_url: "bolt://54.88.38.186:32889",
  17. server_user: "neo4j",
  18. server_password: "change-guest-honks",
  19. labels: {
  20. "Troll": {
  21. caption: "user_key",
  22. size: "pagerank",
  23. community: "community"
  24. }
  25. },
  26. relationships: {
  27. "RETWEETS": {
  28. caption: false,
  29. thickness: "count"
  30. }
  31. },
  32. initial_cypher: "MATCH p=(:Troll)-[:RETWEETS]->(:Troll) RETURN p"
  33. }
  34. var viz = new NeoVis.default(config);
  35. viz.render();
  36. }
  37. </script>
  38. <body onload="draw()">
  39. <div id="viz"></div>
  40. </body>
  41. </html>