Built with blockbuilder.org
Created
April 1, 2017 00:55
-
-
Save yonicd/23197921535f3f1644c4a357048ded9c to your computer and use it in GitHub Desktop.
fresh block
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
license: mit |
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> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://d3js.org/d3.v3.min.js"></script> | |
<style> | |
</style> | |
</head> | |
<body> | |
<script> | |
var margin = {top: 40, right: 90, bottom: 30, left: 400}, | |
width = 960 - margin.left - margin.right, | |
height = 500 - margin.top - margin.bottom; | |
//The SVG Container | |
var svg = d3 | |
.select("body") | |
.append("svg") | |
.attr("width", width + margin.left + margin.right) | |
.attr("height", height + margin.top + margin.bottom) | |
.append("g") | |
.attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | |
/* | |
svg.append("g") | |
.append("path") | |
.attr("d", "M100 50 A50 50 0 1 0 50 100 A60 60 0 1 1 0 100") | |
.attr("stroke", "red") | |
.attr("stroke-width", 40) | |
.attr("fill","none"); | |
*/ | |
svg.append("g") | |
.append("path") | |
.attr("d", "M90 40 A60 40 0 1 0 0 0") | |
.attr("stroke", "blue") | |
.attr("stroke-width", 8) | |
.attr("fill","none"); | |
<!---g> | |
svg.append("g") | |
.append("path") | |
.attr("d", "M50 100 A60 60 0 1 1 0 100") | |
.attr("stroke", "green") | |
.attr("stroke-width", 8) | |
.attr("fill","none"); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment