         if labelGroup.empty()
             labelGroup = svg.append("g").attr("class", "labels")
         
+        #path = pathGroup.selectAll("path.pie")
+        #    .data(piedata)
+
+        #path.enter().append("path")
+        #    .attr("class", "pie")
+        #    .attr("fill",(d, i) -> return color i)
+
         path = pathGroup.selectAll("path.pie")
             .data(piedata)
-
-        path.enter().append("path")
-            .attr("class", "pie")
-            .attr("fill",(d, i) -> return color i)
-        #    .data(piedata)
+            .enter().append("g").attr("class","slice")
+
+        path.append("path")
+            .attr("fill",(d, i) -> return color i),attr("d",arc)
 
         #arcs = svg.selectAll("g.slice")
         #    .data(pie)


        #arcs.append("svg:path").attr("fill", (d, i) -> color i)
        #    .attr("fill-opacity", 0.4).attr("d", arc)

        #path.transition()
        #    .duration(1500)

        #            return arc(b)
        #    )
        #    .remove()
        labels = labelGroup.selectAll("text")
            .data(piedata.sort((p1,p2) -> return p1.startAngle - p2.startAngle))
        labels.enter()
