Skip to content

Instantly share code, notes, and snippets.

@HuVas
HuVas / d3.hemicycle.js
Last active March 16, 2016 08:52 — forked from michalskop/d3.hemicycle.js
Hemicycle: a single vote event
d3.hemicycle = function() {
function hemicycle(selection) {
selection.each(function(d, i) {
// options
var nvar = (typeof(n) === "function" ? n(d) : n),
gapvar = (typeof(gap) === "function" ? gap(d) : gap),
widthIconvar = (typeof(widthIcon) === "function" ? widthIcon(d) : widthIcon),
widthvar = (typeof(width) === "function" ? width(d) : width);
peoplevar = (typeof(people) === "function" ? people(d) : people);