Skip to content

Instantly share code, notes, and snippets.

View aubergene's full-sized avatar

Julian Burgess aubergene

View GitHub Profile
@aubergene
aubergene / README.md
Last active December 15, 2015 06:09
rangeRoundBands v rangeBands

I was confused how rangeRoundBands differed from rangeBands so made this example

@aubergene
aubergene / circle-legend.js
Last active December 17, 2019 20:28
D3 Circular Legend
// Adapted from https://github.com/mbostock/d3/blob/master/src/svg/axis.js
var circleLegend = function() {
'use strict';
var scale,
orient = 'left',
tickPadding = 3,
tickExtend = 5,
tickArguments_ = [10],
tickValues = null,
@aubergene
aubergene / index.html
Created January 26, 2013 21:25
Circular key (similar to axis) v1
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
font: 10px sans-serif;
margin: 0;
}
@aubergene
aubergene / rotate.js
Last active September 9, 2016 20:41
underscore array rotate
/**
* Underscore function to rotate an array
* See also _.cycle https://gist.github.com/901648
*
* _.rotate([1, 2, 3, 4, 5]);
* => [2, 3, 4, 5, 1]
* _.rotate([1, 2, 3, 4, 5], 3);
* => [4, 5, 1, 2, 3]
* _.rotate([1, 2, 3, 4, 5], -3);
* => [3, 4, 5, 1, 2]