Kévin Tessier 5 years ago
parent
commit
9d3a178e12
2 changed files with 4 additions and 4 deletions
  1. 1 1
      index.html
  2. 3 3
      script/script.js

+ 1 - 1
index.html

@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <link rel="stylesheet" href="styles/styles.css">
-<svg width="1920" height="1080"></svg>
+<svg width="500" height="500"></svg>
 <script src="script/d3js/d3.js"></script>
 <script src="script/script.js"></script>

+ 3 - 3
script/script.js

@@ -13,14 +13,14 @@
     if (error) throw error;
 
     var link = svg.append("g")
-        .attr("class", "links")
+      .attr("class", "links")
       .selectAll("line")
       .data(graph.links)
       .enter().append("line")
-        .attr("stroke-width", function(d) { return Math.sqrt(d.value); });
+      .attr("stroke-width", function(d) { return Math.sqrt(d.value); });
 
     var node = svg.append("g")
-        .attr("class", "nodes")
+      .attr("class", "nodes")
       .selectAll("text")
       .data(graph.nodes)
       .enter().append("text")