Skip to content

Instantly share code, notes, and snippets.

@danaoira
Last active June 7, 2017 07: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 danaoira/2200db2faa374584f6106dec37796967 to your computer and use it in GitHub Desktop.
Save danaoira/2200db2faa374584f6106dec37796967 to your computer and use it in GitHub Desktop.
hello-svg-transforms
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
svg {
border: solid 1px #808080;
}
circle {
fill: pink;
}
</style>
</head>
<body>
<svg width="960" height="500">
<g transform="translate(10, 10) scale(1.5)">
<!-- <g transform="scale(1.5) translate(10, 100)"> -->
<circle cx=200 cy=250 r = 25 />
<circle cx=200 cy=100 r=30 />
<circle cx=500 cy=200 r=20 />
</g>
</svg>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment