Skip to content
Snippets Groups Projects
Commit 0fad2910 authored by alvaro's avatar alvaro
Browse files

Added style to circle packing

parent 595975e0
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,7 @@ var pack = d3.layout.pack() ...@@ -105,7 +105,7 @@ var pack = d3.layout.pack()
var vis = d3.select("#clusterpacking'.$randId.'").append("svg") var vis = d3.select("#clusterpacking'.$randId.'").append("svg")
.attr("width", width) .attr("width", width)
.attr("height", height) .attr("height", height)
.attr("class", "pack") .attr("class", "pack").style("font", "10px sans-serif")
.append("g") .append("g")
.attr("transform", "translate(2, 2)"); .attr("transform", "translate(2, 2)");
...@@ -118,7 +118,9 @@ var vis = d3.select("#clusterpacking'.$randId.'").append("svg") ...@@ -118,7 +118,9 @@ var vis = d3.select("#clusterpacking'.$randId.'").append("svg")
node.append("title") node.append("title")
.text(function(d) { return d.name + (d.children ? "" : ": " + format(d.size)); }); .text(function(d) { return d.name + (d.children ? "" : ": " + format(d.size)); });
node.append("circle") node.append("circle").style("fill", function(d) { return d.children ? "rgb(31, 119, 180)" : "#ff7f0e"; })
.style("fill-opacity", function(d) { return d.children ? ".25" : "1"; })
.style("stroke", "rgb(31, 119, 180)").style("stroke-width", "1px")
.attr("r", function(d) { return d.r; }); .attr("r", function(d) { return d.r; });
node.filter(function(d) { return !d.children; }).append("text") node.filter(function(d) { return !d.children; }).append("text")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment