Skip to content

Instantly share code, notes, and snippets.

@ng-the-engineer
Last active May 21, 2021 10:38
Show Gist options
  • Select an option

  • Save ng-the-engineer/ab3803a4092c8937c48211611ce13552 to your computer and use it in GitHub Desktop.

Select an option

Save ng-the-engineer/ab3803a4092c8937c48211611ce13552 to your computer and use it in GitHub Desktop.
Code snippet of tutorial bubble plot
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