Skip to content

Instantly share code, notes, and snippets.

@milroc
milroc / README.md
Last active January 12, 2020 03:27 — forked from mbostock/.block
@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
Last active March 23, 2016 19:32 — forked from mbostock/.block
States & Provinces (warning may cause seizures)
license: gpl-3.0
@milroc
milroc / README.md
Created July 6, 2012 22:34 — forked from milroc/README.md
bl.ocks template

Template for creating bl.ocks.

@milroc
milroc / README.md
Last active January 4, 2016 03:49 — forked from mbostock/.block

Click on any arc to zoom in. Click on the center circle to zoom out.

A sunburst is similar to a treemap, except it uses a radial layout. The root node of the tree is at the center, with leaves on the circumference. The area (or angle, depending on implementation) of each arc corresponds to its value. Sunburst design by John Stasko. Data courtesy Jeff Heer.

@milroc
milroc / index.html
Created January 22, 2014 02:04 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
rect {
stroke: #fff;
}
</style>
<body>
@milroc
milroc / README.md
Created January 22, 2014 01:31 — forked from mbostock/.block

This bar chart visualizes hierarchical data using D3. Each blue bar represents a folder, whose length encodes the total size of all files in that folder (and all subfolders). Clicking on a bar dives into that folder, while clicking on the background bubbles back up to the parent folder. The effect is similar to a zoomable partition layout, though in a more conventional display.

@milroc
milroc / README.md
Created January 17, 2014 21:00 — forked from mbostock/.block

This variation of a line chart demonstrates how to use a linear gradient to change the color of a line based on a y-threshold. This technique is similar to the gradient encoding, but with two stops at the same offset. An alternative method is to draw multiple lines with different colors and different clipping regions.

@milroc
milroc / README.md
Last active December 26, 2015 00:38 — forked from caged/README.md