Prototype Chart Template (WIP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.mbostock.pie = function() { | |
var pie = {}, | |
parent, | |
data; | |
var svg = d3.create("svg:svg"); | |
function redraw() { | |
return pie; | |
} | |
pie.data = function(x) { | |
if (!arguments.length) return data; | |
data = x; | |
return redraw(); | |
}; | |
pie.parent = function(x) { | |
if (!arguments.length) return parent; | |
parent = x ? svg.remove() : d3.select(parent).adopt(svg); | |
return pie; | |
}; | |
return pie; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment