Last active
May 21, 2021 10:38
-
-
Save ng-the-engineer/ab3803a4092c8937c48211611ce13552 to your computer and use it in GitHub Desktop.
Code snippet of tutorial bubble plot
This file contains hidden or 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
| const margin = { top: 10, right: 20, bottom: 30, left: 50 }; | |
| const width = 500 - margin.left - margin.right; | |
| const height = 420 - margin.top - margin.bottom; | |
| const xLabelHeight = 50; | |
| d3.csv("https://tutorial-node-api-k8s-ng-the-engineer.cloud.okteto.net/skills", (data) => { | |
| ... | |
| } | |
| ); | |
| const svg = d3 | |
| .select("#skills_bubble_plot") | |
| .append("svg") | |
| .attr("width", width + margin.left + margin.right) | |
| .attr("height", height + margin.top + margin.bottom + xLabelHeight) | |
| .append("g") | |
| .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment