Skip to content

Instantly share code, notes, and snippets.

@milroc
milroc / README.md
Last active October 14, 2021 22:33

d3.unconf example gist. Fork it here.

@milroc
milroc / README.md
Last active January 12, 2020 03:27 — forked from mbostock/.block
@milroc
milroc / d3.v3.min.js
Created March 28, 2014 20:28
Imports for Blocks
!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function r(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return ha+n in this}function c(n){return n=ha+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===ga&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===ga)return!1;return!0}function h(){}function g(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function p(n,
@milroc
milroc / .block
Created September 23, 2017 21:42
Popsicles
license: gpl-3.0
@milroc
milroc / README.md
Last active October 23, 2019 20:09 — forked from mbostock/.block
Minimum Viable Chart Junk (Updating Line Chart)

This is a fork of Mike Bostock's Line Transition.

This fork was originally intended to showcase a principle of using padding between the x and y axis. This is a concept I've seen covered over and over again when dealing with non-zero minimum value charts (see example).

I also found it interesting to update both the line and the x axis. It should be noted that this was not the intent of the line transition example, seeing that the line was treated as a queue, pushing and popping from the front and back of the data. It talked on how to prevent odd visual behavior of the path when those changes occur, nothing more or less.

That being said, the visual change to the axis was a hack (see x_axis_scale) to just better understand how useful a constant, fast linear change effects my comprehension of the data.

So far, my personal opinion is that when dealing with updating data similar to this, it is best to spend most of your no

@milroc
milroc / README.md
Last active December 23, 2017 22:07 — forked from tommaybe/LICENSE.md

Inspired by Trulia Trends - but with code and using SVG.

Example data shows concurrent user sessions over time, taken from a development environment.

@milroc
milroc / .block
Created March 7, 2017 05:52
Fitts's Bar, I
license: mit
@milroc
milroc / .block
Created March 7, 2017 05:51
Fitts's Bar, I
license: mit
@milroc
milroc / .block
Last active March 7, 2017 05:50
Fitts's Bar, I
license: mit
@milroc
milroc / .block
Last active March 7, 2017 05:44
Fitts's Bar, I
license: mit