From 682e73e737e6a315b10be94e35e67a8e2b236557 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 3 Jun 2012 13:24:14 +0200 Subject: [PATCH] more compact nodemap --- html/force.css | 5 +++-- html/force.js | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/html/force.css b/html/force.css index 88ce4d5..736e3aa 100644 --- a/html/force.css +++ b/html/force.css @@ -1,10 +1,11 @@ .node ellipse { fill: #fff; - stroke-width: 1.5px; + stroke-width: 2.5px; } .node text { - font-size: 14px; + font-size: 10px; + color: #333; } line.link { diff --git a/html/force.js b/html/force.js index de8fb72..962cbef 100644 --- a/html/force.js +++ b/html/force.js @@ -49,15 +49,14 @@ d3.json("nodes.json", function(json) { .call(force.drag); node.append("ellipse") - .attr("rx", function(d) { if (d.group == 3) return 4; else return Math.max(14, d.name.length * 5); }) - .attr("ry", function(d) { if (d.group == 3) return 4; else return 14; }) + .attr("rx", function(d) { if (d.group == 3) return 4; else return Math.max(10, d.name.length * 5); }) + .attr("ry", function(d) { if (d.group == 3) return 4; else return 10; }) .style("fill", function(d) { if (d.group == 3) return fill(d.group); else return ""; }) .style("stroke", function(d) { return fill(d.group); }); node.append("text") .attr("text-anchor", "middle") .attr("y", "4px") - .style("fill", function(d) { return fill(d.group); }) .text(function(d) { if (d.group == 3) return ""; else return d.name; }); node.append("title")