This is not an article.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
.graphic { | |
font-family: Helvetica; | |
padding: 10px 0; | |
margin: 0 auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background: white; | |
} | |
.land { | |
fill: #00ff00; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style media="screen"> | |
.child { | |
margin: 10px 0; | |
color: white; | |
} | |
button { |
In order to generate a raster image with d3 in node.js, you need a canvas context. This is a bare bones example of using a node-based canvas for said context.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1> This is a Head | |
h2> This is h2 | |
p> this is a p | |
p> this is another one | |
p> It's just like html with significant whitespace. | |
p> what about {b>inline} tags? | |
p> And that's about it, although it would allow you to do more complicated stuff. | |
h2> More Complicated Stuff | |
p.foo> You can add classes to elements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1{This is a Head} | |
h2{This is an h2} | |
p{This is an implied p element.} | |
p{This is another one.} | |
p{It's just like html but with significant whitespace.} | |
p{What about b{inline} tags?} | |
p{And that's about it, although it would allow you to do more complicated stuff.} | |
h2{More Complicated Stuff} | |
p.foo{You can add classes to elements.} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>This is a Head | |
<h2>This is an h2 | |
This is an implied p element. It's just like html with significant whitespace. | |
This is new paragraph. | |
What about <b>{inline} tags? | |
And that's about it, although it would allow you to do more complicated stuff. | |
<h2>More Complicated Stuff | |
<p.foo>You can add classes to elements. | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v4.min.js"></script> | |
<script> | |
let margin = {top: 100, right: 100, bottom: 100, left: 100}; | |
let width = 960, | |
height = 500, |
OlderNewer