Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: third_party/WebKit/Source/devtools/scripts/visualize_deps/d3.html

Issue 2624873002: DevTools: visualize deps (Closed)
Patch Set: clean Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/scripts/visualize_deps/d3.html
diff --git a/third_party/WebKit/Source/devtools/scripts/visualize_deps/d3.html b/third_party/WebKit/Source/devtools/scripts/visualize_deps/d3.html
new file mode 100644
index 0000000000000000000000000000000000000000..bea2f7b9b32ef4fb8c639dabf62b0b38a1cad526
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/scripts/visualize_deps/d3.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<meta charset="utf-8">
+<script src="http://d3plus.org/js/d3.js"></script>
+<script src="http://d3plus.org/js/d3plus.js"></script>
+<script src="out/modules.js"></script>
+<div id="viz"></div>
+
+<script>
+function getParameterByName(name, url) {
+ if (!url) {
+ url = window.location.href;
+ }
+ name = name.replace(/[\[\]]/g, "\\$&");
+ var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
+ results = regex.exec(url);
+ if (!results) return null;
+ if (!results[2]) return '';
+ return decodeURIComponent(results[2].replace(/\+/g, " "));
+}
+
+var visualization = d3plus.viz()
+ .container("#viz")
+ .type("rings")
+ .edges(modules.map(([k, v])=> {return {source: k, target: v}}))
+ .edges({"arrows": true})
+ .focus(getParameterByName('id') || "sdk")
+ .draw();
+</script>

Powered by Google App Engine
This is Rietveld 408576698