OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <meta charset="utf-8"> |
| 3 <script src="http://d3plus.org/js/d3.js"></script> |
| 4 <script src="http://d3plus.org/js/d3plus.js"></script> |
| 5 <script src="out/modules.js"></script> |
| 6 <div id="viz"></div> |
| 7 |
| 8 <script> |
| 9 function getParameterByName(name, url) { |
| 10 if (!url) { |
| 11 url = window.location.href; |
| 12 } |
| 13 name = name.replace(/[\[\]]/g, "\\$&"); |
| 14 var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), |
| 15 results = regex.exec(url); |
| 16 if (!results) return null; |
| 17 if (!results[2]) return ''; |
| 18 return decodeURIComponent(results[2].replace(/\+/g, "
")); |
| 19 } |
| 20 |
| 21 var visualization = d3plus.viz() |
| 22 .container("#viz") |
| 23 .type("rings") |
| 24 .edges(modules.map(([k, v])=> {return {source: k, target: v}})) |
| 25 .edges({"arrows": true}) |
| 26 .focus(getParameterByName('id') || "sdk") |
| 27 .draw(); |
| 28 </script> |
OLD | NEW |