|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
/** Total width of the wheel (also counts for the height) */ |
|
|
|
|
|
|
|
|
|
$(document).ready(function() { |
|
|
|
|
|
|
|
|
|
var w = 800, |
|
|
|
|
h = w, |
|
|
|
|
r = w / 2, |
|
|
|
@ -113,12 +114,6 @@ $(document).ready(function() { |
|
|
|
|
return d.depth ? d.name.split(" ")[1] || "" : ""; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function click(d) { |
|
|
|
|
path.transition() |
|
|
|
|
.duration(duration) |
|
|
|
@ -149,7 +144,7 @@ function click(d) { |
|
|
|
|
d3.select(this).style("visibility", isParentOf(d, e) ? null : "hidden"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/* Returns whether p is parent of c */ |
|
|
|
|
function isParentOf(p, c) { |
|
|
|
@ -201,3 +196,5 @@ function maxY(d) { |
|
|
|
|
function brightness(rgb) { |
|
|
|
|
return rgb.r * .299 + rgb.g * .587 + rgb.b * .114; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|