d3.unconf example gist. Fork it here.
-
-
Save why-not/9693438 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<link type="text/css" rel="stylesheet" href="style.css"/> | |
</head> | |
<body> | |
<h2 class="d3-unconf">register me already!</h2> | |
<div id="chart"></div> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="src.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
d3.unconf = function() { | |
console.log('register me already!'); | |
}; | |
d3.unconf(); | |
var svg = d3.select("body") | |
.append("svg") | |
.attr("width", 500) | |
.attr("height", 500); | |
svg.append("circle") | |
.attr("cx", 100) | |
.attr("cy", 0) | |
.attr("r", 50) | |
.attr("fill", "steelblue"); | |
svg.append("circle") | |
.attr("cx", 300) | |
.attr("cy", 0) | |
.attr("r", 50) | |
.attr("fill", "steelblue"); | |
svg.append("circle") | |
.attr("cx", 200) | |
.attr("cy", 150) | |
.attr("r", 75) | |
.attr("fill", "black"); | |
svg.append("svg:path") | |
.attr("d","M 65 400 q 150 -300 300 0") | |
.style("stroke-width", 10) | |
.style("stroke", "steelblue") | |
.style("fill", "none"); | |
This file contains hidden or 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
@import url("//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700"); | |
body { | |
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Helvetica, Arial, sans-serif; | |
} | |
.d3-unconf { | |
color: #222; | |
font-size: 44px; | |
font-style: normal; | |
font-weight: 300; | |
text-rendering: optimizelegibility; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment