[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-web/master] Fix bubble graphs.



commit 9db85309bff73e4ba461df208f3f4235510fe389
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Wed Dec 21 17:58:30 2016 +0100

    Fix bubble graphs.
---
 website/web/WEB-INF/bubbles.jsp | 1 +
 website/web/js/bubbles.js       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/website/web/WEB-INF/bubbles.jsp b/website/web/WEB-INF/bubbles.jsp
index 70af5d0..d0d8f84 100644
--- a/website/web/WEB-INF/bubbles.jsp
+++ b/website/web/WEB-INF/bubbles.jsp
@@ -62,6 +62,7 @@ information, country, or network family.</p>
         <a href="#country-exits-only" onclick="make_bubble_graph('country-exits-only');">Country</a> |
         <a href="#network-family-exits-only" onclick="make_bubble_graph('network-family-exits-only');">Network family (/16)</a>
       </p>
+      <div id="bubble-graph-placeholder"></div>
       <script src="js/d3.min.js"></script>
       <script src="js/bubbles.js"></script>
       <script>make_bubble_graph();</script>
diff --git a/website/web/js/bubbles.js b/website/web/js/bubbles.js
index 8030e20..b8c7194 100644
--- a/website/web/js/bubbles.js
+++ b/website/web/js/bubbles.js
@@ -53,7 +53,7 @@ function make_bubble_graph(graph_name) {
     .size([diameter, diameter])
     .padding(1.5);
 
-  var svg = d3.select("body").append("svg")
+  var svg = d3.select("#bubble-graph-placeholder").append("svg")
     .attr("id", "bubble-graph")
     .attr("width", diameter + legendWidth)
     .attr("height", diameter)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits