Skip to content

Instantly share code, notes, and snippets.

@scameron
scameron / README.md
Created September 12, 2013 23:32 — forked from mbostock/.block

For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.

@scameron
scameron / index.html
Created July 20, 2012 05:47
textPath Chrome bug
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Test</title>
<body>
<div class="sample"></div>
</body>
<script type="text/javascript">
@scameron
scameron / index.html
Created April 2, 2012 05:42
Axis scale tick distribution example
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>bar</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
div {
border: 1px solid #BBB;
padding: 0px;
@scameron
scameron / index.html
Created March 29, 2012 22:03
D3 transitions bug with new Chrome version.
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>bar</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
table td {
border: 1px solid #BBB;
}
@scameron
scameron / index.html
Created March 2, 2012 06:44
Sparkline in table.
<!DOCTYPE html>
<html>
<head>
<title>Animated Sparkline</title>
<script src="http://bost.ocks.org/mike/d3.v2.min.js"></script>
<style type="text/css">
svg {
display: block;
position: relative;
}
@scameron
scameron / index.html
Created March 2, 2012 00:56
Multiple sparkline transition strangeness
<!DOCTYPE html>
<html>
<head>
<title>Animated Sparkline</title>
<script src="http://bost.ocks.org/mike/d3.v2.min.js"></script>
<style type="text/css">
path {
stroke: steelblue;
stroke-width: 1;
@scameron
scameron / index.html
Created February 24, 2012 21:46
Animated sparkline in D3
<!DOCTYPE html>
<html>
<head>
<title>Animated Sparkline</title>
<script src="http://bost.ocks.org/mike/d3.v2.min.js"></script>
<style type="text/css">
path {
stroke: steelblue;
stroke-width: 1;