Skip to content

Instantly share code, notes, and snippets.

View terrysmith2000's full-sized avatar

terrysmith2000

View GitHub Profile
@terrysmith2000
terrysmith2000 / index.html
Created August 18, 2012 23:39 — forked from mbostock/.block
Interactive Force-Directed Layout (D3)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Force-Directed Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.25.0"></script>
<style type="text/css">
@terrysmith2000
terrysmith2000 / a_chart.js
Created August 13, 2012 14:22 — forked from jhaubrich/a_chart.js
multiline chart using nvd3's preferred json structure
var chart = d3.select("#chart").append("svg")
.attr("width", w)
.attr("height", h)
.append("g")
.attr("id", "plotarea")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
// DRAW DATALINES
path = chart.selectAll("path.dataline")
.data(data)
@terrysmith2000
terrysmith2000 / barDiv.js
Created July 26, 2012 18:01 — forked from gmp26/barDiv.js
Stacked or grouped bars with zoom
(function() {
var n = 9, // number of layers
m = 1, // number of samples per layer
sourceData = stream_layers(n, m, 0.1);
/*
sourceData = [
[{x:0,y:9800}],
[{x:0,y:128}],
[{x:0,y:60}],
@terrysmith2000
terrysmith2000 / index.html
Created July 8, 2012 18:59 — forked from ZJONSSON/index.html
barStack (flex layout)
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="rickshaw.min.css">
</head>
<body>
<title>The Wealth & Health of Nations</title>
<style>
@import url(bost.ocks.org/mike/style.css?20120427);
@terrysmith2000
terrysmith2000 / test.html
Created July 8, 2012 16:33 — forked from ojii/test.html
rickshaw
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="rickshaw.min.css">
</head>
<body>
<div id="chartcontainer-31992208">
<div id="chartyaxis-31992208"></div>
<div id="chart-31992208"></div>
</div>
svg {
background: #eee;
width: 960px;
height: 540px;
}
#countries path {
stroke: steelblue;
stroke-width: 1px;
}
@terrysmith2000
terrysmith2000 / d3.geo.js
Created June 27, 2012 20:51 — forked from johan/index.html
testingAnimated Draggable Spinny Globe
(function(){d3.geo = {};
var d3_geo_radians = Math.PI / 180;
// TODO clip input coordinates on opposite hemisphere
d3.geo.azimuthal = function() {
var mode = "orthographic", // or stereographic, gnomonic, equidistant or equalarea
origin,
scale = 200,
translate = [480, 250],
x0,
@terrysmith2000
terrysmith2000 / README.md
Created June 27, 2012 20:46 — forked from mbostock/.block
My test
svg {
width: 1280px;
height: 800px;
pointer-events: all;
}
#countries path {
stroke: steelblue;
stroke-width: 1px;
}