Skip to content

Instantly share code, notes, and snippets.

@jsl6906
jsl6906 / _.md
Created April 19, 2014 00:34
D3 Generic Template
@jsl6906
jsl6906 / _.md
Created April 26, 2014 18:10
Modifying existing bound data with .each()
@jsl6906
jsl6906 / _.md
Created April 27, 2014 00:32
Gradient Color Scale
@jsl6906
jsl6906 / index.html
Last active August 29, 2015 14:05
Orthographic 'arc' using d3.graticule()
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<style>
.land {
fill: #B6C598;
stroke: #818141;
}
@jsl6906
jsl6906 / index.html
Last active August 29, 2015 14:06
colorUnderCurve
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
body {
cursor: e-resize;
}
.axis text {
font: 10px sans-serif;
@jsl6906
jsl6906 / index.html
Created September 19, 2014 21:04
Ordinal Axis Grouping 1
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
text {
font: 12px sans-serif;
}
.axis path, .axis line {
fill: none;
@jsl6906
jsl6906 / index.html
Last active August 29, 2015 14:06
Ordinal Axis Grouping 2
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
text {
font: 12px sans-serif;
}
.axis path, .axis line, g.chartGroup path {
fill: none;
@jsl6906
jsl6906 / data.csv
Created November 19, 2014 15:07
JsonToPartition
ccgname practicename diagnosisname numpatientswithdiagnosis
ccg1 practice1 diagnosis1 95
ccg1 practice1 diagnosis1 71
ccg1 practice1 diagnosis1 73
ccg1 practice1 diagnosis1 92
ccg1 practice5 diagnosis1 77
ccg1 practice5 diagnosis1 64
ccg1 practice5 diagnosis1 88
ccg1 practice8 diagnosis1 84
ccg1 practice9 diagnosis1 21
@jsl6906
jsl6906 / index.html
Last active April 3, 2016 00:23
Circle path generator
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
function circleGen() {
//set defaults
var r = function(d) { return d.radius; },
x = function(d) { return d.x; },
@jsl6906
jsl6906 / .block
Created June 1, 2017 13:55
Lines as Text
license: mit