(function() {
  var data = [
    { label: 'one', value: 2 },
    { label: 'two', value: 5 },
    { label: 'three', value: 1.5 },
    { label: 'other', value: 1 }
  ],
  pie,
  legend;

  // YOUR SAMPLE CHART USAGE GOES HERE.
  pie = d3.select('#pie')
    .append('svg')
      .attr('width', 450)
      .attr('height', 300)
      .chart('Pie', {
        radius: 100,
        innerRadius: 80,
        labelTemplate: '{label}: {value}',
        labels: false,
        legend: {
          x: 250,
          y: 50
        }
      });

  legend = d3.select('#legend')
    .append('svg')
      .attr('width', 450)
      .attr('height', 300)
      .chart('Legend');

  pie.draw(data);
  legend.draw(data);
}());

@@ -169,60 +169,10 @@
  pie
-,%0A  legend;%0A%0A  // YOUR SAMPLE CHART USAGE GOES HERE.
+;%0A
 %0A  p
@@ -381,24 +381,26 @@
 %7D',%0A        
+//
 labels: fals
@@ -481,161 +481,11 @@
 %0A%0A  
-legend = d3.select('#legend')%0A    .append('svg')%0A      .attr('width', 450)%0A      .attr('height', 300)%0A      .chart('Legend');%0A%0A  pie.draw(data);%0A  legend
+pie
 .dra

Remove legend example