Skip to content

Instantly share code, notes, and snippets.



Last active Jan 26, 2019
What would you like to do?
d3.rect - v4
<!DOCTYPE html>
<meta charset=utf-8>
<meta name="description" content="D3.js v4, transition, color, location" />
<script src=""></script>
<!-- .attrs() -->
<script src=""></script>
var svg ='body')
.attrs({ width: 500, height: 200 });
.attrs({ x: 10, y: 10, width: 80, height: 80, fill: 'red' })
.attrs({ x: 460, y: 150, width: 40, height: 40, fill: 'blue' });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.