Skip to content

Instantly share code, notes, and snippets.

@jstcki
jstcki / README.md
Last active December 20, 2015 21:48
Animating Flowers
@jstcki
jstcki / README.md
Last active December 12, 2017 21:22
Filtering the Grid 2

Filtering items in a grid layout with a fixed amount of columns and rows.

@jstcki
jstcki / README.md
Last active December 18, 2015 02:19
Filtering the Grid
@jstcki
jstcki / README.md
Last active October 6, 2017 15:43
Sorting the Grid
@jstcki
jstcki / README.md
Last active February 10, 2017 21:23
Grid layout
@jstcki
jstcki / README.md
Last active December 16, 2015 17:08
Indented tree layout
@jstcki
jstcki / README.md
Last active November 18, 2018 18:22
Polylinear Time Scale

When creating a polylinear time scale, the tricky part is to know to which value in the range the intermediate dates should map.

Let's say we want to "zoom in" on 4 particular days and make them appear with the size of 10 days each. Because these days now take up more space (36 or (factor - 1) * n), we need to create a linear time scale where the domain ends at 36 days later than we want to show. This scale is then used to determine the intermediary range values of the polylinear scale.

@jstcki
jstcki / README.md
Last active December 16, 2015 06:19
ZipScribble Switzerland
@jstcki
jstcki / README.md
Last active December 16, 2015 05:49
Zipdecode Switzerland
@jstcki
jstcki / index.js
Created March 18, 2013 17:23
D3 Data Tutorial
require("http://d3js.org/d3.v3.js");
var data = [{"id":"ARE","pop":7890924,"country_name":"United Arab Emirates"},
{"id":"ARG","pop":40764561,"country_name":"Argentina"},
{"id":"AUS","pop":22620600,"country_name":"Australia"}];
// How many items are in the data?
var dataCount = data.length;