Skip to content

Commit

Permalink
Sharpen up label text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Frederickson committed Aug 14, 2014
1 parent 62b4442 commit d047d0c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions venn.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@
circleStrokeColours = parameters.circleStrokeColours || circleFillColours,
circleStrokeWidth = parameters.circleStrokeWidth || function(i) { return 0; },
textFillColours = parameters.textFillColours || colours,
textStrokeColours = parameters.textStrokeColours || textFillColours,
nodeOpacity = parameters.opacity || 0.3,
padding = parameters.padding || 6;

Expand All @@ -520,11 +519,11 @@
.style("fill", function(d, i) { return circleFillColours(i); });

var text = nodes.append("text")
.attr("x", function(d) { return d.x; })
.attr("y", function(d) { return d.y; })
.attr("x", function(d) { return Math.floor(d.x); })
.attr("y", function(d) { return Math.floor(d.y); })
.attr("text-anchor", "middle")
.attr("dy", "0.35em")
.style("stroke", function(d, i) { return textStrokeColours(i); })
.attr("stroke-width", 0)
.style("fill", function(d, i) { return textFillColours(i); })
.text(function(d) { return d.label; });

Expand Down

0 comments on commit d047d0c

Please sign in to comment.