Created
March 29, 2019 07:46
-
-
Save simonwuyts/08a003146a9bbbcda797856de6bba4f0 to your computer and use it in GitHub Desktop.
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
// Add a <g> element for every data point | |
const leaf = svg.selectAll('g').data(circles) | |
// Append a styled <circle> to every <g> element | |
leaf | |
.append('circle') | |
.attr('id', d => d.data.id) | |
.attr('r', d => d.r) | |
.attr('fill-opacity', 0.7) | |
.attr('fill', d => d.data.color) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment