D3.js donut chart

HTML

<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js">


</script>


<div id="pies"></div>

CSS

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: relative;
  background: #432010;
}

#pies {
  width: 560px;
  height: 500px;
}

svg {
  width: 100%;
  height: 100%;
}

path.slice {
  stroke-width: 2px;
}

polyline {
  opacity: .3;
  stroke: black;
  stroke-width: 2px;
  fill: none;
}

.labelholder {
  fill: white;
}

.gapcircles{
  fill: transparent;
}

JavaScript

var svg = d3.select("#pies")
  .append("svg")
  .append("g")

svg.append("g")
  .attr("class", "slices");
svg.append("g")
  .attr("class", "placeholders");

svg.append("g")
  .attr("class", "gapplaceholders");
  
svg.append("g")
  .attr("class", "labelholders");


var width = 560,
  height = 450,
  radius = Math.min(width, height) / 2;

var pie = d3.layout.pie()
  .sort(null)
  .value(function(d) {
    return d.value;
  });

var arc = d3.svg.arc()
  .outerRadius(radius * 0.85)
  .innerRadius(radius * 0.83);

var outerArc = d3.svg.arc()
  .innerRadius(radius * 0.9)
  .outerRadius(radius * 0.9);

svg.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");

var key = function(d) {
  return d.data.label;
};

function colores_google(n) {
  var colores_g = ["#e9168a", "#f8dd2f", "#448875", "#c3bd75", "#2b2d39", "#311854", "#553814", "#f7b363", "#89191d", "#c12f34", "#2b2a2c", "#c5b8a6", "#57585b"];
  return colores_g[n % colores_g.length];
}


var data = [{
  group: "g1",
  label: "test1",
  id: 0,
  value: 5
}, {
  group: "g1",
  label: "test2",
  id: 1,
  value: 5
}, {
  group: "g1",
  label: "test3",
  id: 2,
  value: 5
}, {
  group: "g1",
  label: "test4",
  id: 3,
  value: 5
}, {
  group: "g1",
  label: "test5",
  id: 4,
  value: 5
}, {
  group: "g1",
  label: "test6",
  id: 5,
  value: 5
}, {
  group: "g1",
  label: "test7",
  id: 6,
  value: 5
}, {
  group: "g1",
  label: "test8",
  id: 7,
  value: 5
}, {
  group: "g1",
  label: "test1",
  id: 8,
  value: 5
}, {
  group: "g1",
  label: "test2",
  id: 9,
  value: 5
}, {
  group: "g1",
  label: "test3",
  id: 10,
  value: 5
}, {
  group: "g1",
  label: "test4",
  id: 11,
  value: 5
}, {
  group: "g1",
  label: "test5",
  id: 12,
  value: 5
}, {
  group: "g1",
  label: "test6",
  id: 13,
  value: 5
}, {
  group: "g1",
  label: "test7",
  id: 14,
  value: 5
}, {
  group: "g1",
  label: "test5",
  id: 112,
  value: 5
}, {
  group: "g1",
  label: "test6",
  id: 113,
  value: 5
}, {
  group: "g1",
 ...