Skip to content

Instantly share code, notes, and snippets.

@ZJONSSON
ZJONSSON / index.html
Created October 20, 2011 04:31
Contour Test using Jason Davis implementation with D3
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://paulbourke.net/papers/conrec/conrec.js"></script>
<script type="text/javascript" src="multiplot.js"></script>
</head>
<body>
<script type="text/javascript">
var c = new Conrec(),
xs = d3.range(0, data[0].length),
@ZJONSSON
ZJONSSON / index.html
Created October 22, 2011 23:20
D3 - using SVG Bounding Box to get the "automatic padding"
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.0.0"></script>
<style>
path { fill:none;stroke:black}
</style>
<head>.
<body>
@ZJONSSON
ZJONSSON / index.html
Created October 26, 2011 19:10
Basic contours in D3
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="multiplot.js"></script>
</head>
<body></body>
<script type="text/javascript">
@ZJONSSON
ZJONSSON / index.html
Created November 2, 2011 16:10
Icesave capital structure - nest/layout example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.29.1"></script>
@ZJONSSON
ZJONSSON / index.html
Created November 6, 2011 15:52
Basic filled contours in D3
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="multiplot.js"></script>
</head>
<body></body>
<script type="text/javascript">
@ZJONSSON
ZJONSSON / d3mod.js
Created January 11, 2012 17:41
Internalizing chart variables (mod)
(function(){if (!Date.now) Date.now = function() {
return +new Date;
};
try {
document.createElement("div").style.setProperty("opacity", 0, "");
} catch (error) {
var d3_style_prototype = CSSStyleDeclaration.prototype,
d3_style_setProperty = d3_style_prototype.setProperty;
d3_style_prototype.setProperty = function(name, value, priority) {
d3_style_setProperty.call(this, name, value + "", priority);
@ZJONSSON
ZJONSSON / index.html
Created January 11, 2012 18:32
Internalizing chart variables (mod)
<html>
<head><script type="text/javascript" src="https://raw.github.com/gist/1595803/d3mod.js"></script></head>
<body>
<script type="text/javascript">
d3.select("body")
.append("svg:svg")
.property("__chart__",function() {
return {
@ZJONSSON
ZJONSSON / index.html
Last active October 6, 2015 09:57
barStack - stacking with negative values
<!DOCTYPE html>
<html>
<head>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<title>barStack</title>
<style>
.axis text {
font: 10px sans-serif;
}
.axis path, .axis line {
@ZJONSSON
ZJONSSON / index.html
Created June 23, 2012 21:09
barStack (flex layout)
<!DOCTYPE html>
<html>
<head>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<title>barStack</title>
<style>
.axis text {
font: 10px sans-serif;
}
.axis path, .axis line {
@ZJONSSON
ZJONSSON / cards.svg
Created August 10, 2012 14:54
Blackjack?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.