Skip to content

Instantly share code, notes, and snippets.

@mbostock mbostock/pie.js
Created Nov 14, 2011

What would you like to do?
Prototype Chart Template (WIP)
d3.mbostock.pie = function() {
var pie = {},
var svg = d3.create("svg:svg");
function redraw() {
return pie;
} = function(x) {
if (!arguments.length) return data;
data = x;
return redraw();
pie.parent = function(x) {
if (!arguments.length) return parent;
parent = x ? svg.remove() :;
return pie;
return pie;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.