Skip to content

Instantly share code, notes, and snippets.

@scottlittle
Created March 15, 2017 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottlittle/a0e9d93191c9731c46c762abe2c7970b to your computer and use it in GitHub Desktop.
Save scottlittle/a0e9d93191c9731c46c762abe2c7970b to your computer and use it in GitHub Desktop.
fresh block
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v3.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<script>
var data = [ 19, 80, 30, 15, 55, 35, 40, 45, 50, 70, 109, 176, 78, 87, 76, 22, 2, 33, 44, 59, 200]
var data3d = [[62, 134, 92],
[136, 166, 46],
[148, 165, 50],
[9, 131, 60],
[132, 175, 14],
[25, 121, 164],
[152, 31, 179],
[135, 72, 52],
[18, 52, 26],
[79, 56, 140],
[112, 54, 50],
[196, 132, 188],
[3, 124, 5],
[148, 173, 95],
[107, 159, 166],
[75, 156, 126],
[15, 92, 17],
[64, 67, 22],
[32, 120, 14],
[112, 97, 19]]
// Feel free to change or delete any of the code you see in this editor!
var svg = d3.select("body").append("svg")
.attr("width", 960)
.attr("height", 500)
var hscale = d3.scale.linear()
.domain([0, d3.max(data)])
.range([0, 3])
// svg.append("text")
// .text("Edit the code below to change me!")
// .attr("y", 200)
// .attr("x", 120)
// .style("font-size", 36)
// .style("font-family", "monospace")
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment