Created
June 2, 2021 07:38
-
-
Save bumbeishvili/16e541752e10f086325b57c4152e03bc to your computer and use it in GitHub Desktop.
D3 Differences
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
// Old | |
d3.selectAll('rect') | |
.data(data) | |
.append('rect') | |
// New | |
d3.selectAll('rect') | |
.data(data) | |
.join('rect') |
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
// Old | |
d3.csv('dataUrl',function(data){ | |
console.log(data) | |
}) | |
// New | |
d3.csv('dataUrl') | |
.then(function(data){ | |
console.log(data) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment