Skip to content

Instantly share code, notes, and snippets.

@micahstubbs
Last active March 12, 2016 22:55
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 micahstubbs/470cde4c5a3cf8eb9cea to your computer and use it in GitHub Desktop.
Save micahstubbs/470cde4c5a3cf8eb9cea to your computer and use it in GitHub Desktop.
building blocks svg flag
license: CC0-1.0

datasana #1

<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
</head>
<style>
body {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
<body style="margin0">
<svg width=100% height=100%>
<circle r=50 cx=280 cy=60></circle>
<rect x=2.72 y=2.8 width=100 height= 200></rect>
<path
d="M125,101L222,194L225,101Z"
fill="none"
stroke="steelblue"
stroke-width="10">
</path>
</svg>
<script>
d3.select("circle")
.style("fill","steelblue");
d3.select("rect")
//.attr("transform", "rotate(-90)")
.style("fill", "gray");
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment