Explorar o código

Merge branch 'master' of https://figureslibres.io/gogs/kevin/r2c_mapd3js

marie %!s(int64=6) %!d(string=hai) anos
pai
achega
2cc9f2edbd
Modificáronse 3 ficheiros con 5 adicións e 5 borrados
  1. 1 1
      index.html
  2. 1 1
      miserables.json
  3. 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>

+ 1 - 1
miserables.json

@@ -1,6 +1,6 @@
 {
   "nodes": [
-    {"id": "Oceane", "group": 1},
+    {"identifiant":"qui_il_est", "cible": "ou_il_va", "id": "Oceane", "group": 1},
     {"id": "Wiebke", "group": 1},
     {"id": "Manon", "group": 1},
     {"id": "Andreea", "group": 1},

+ 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")