Skip to content

Instantly share code, notes, and snippets.

@yani-
Created June 24, 2017 20:37
Show Gist options
  • Save yani-/c63316c90c51ccf2048564e598a15987 to your computer and use it in GitHub Desktop.
Save yani-/c63316c90c51ccf2048564e598a15987 to your computer and use it in GitHub Desktop.
svg.attr('width', width);
svg.attr('height', height);
const margin = {
top : 20,
right : 80,
bottom : 30,
left : 30
};
const chartWidth = +svg.attr("width") - margin.left - margin.right;
const chartHeight = +svg.attr("height") - margin.top - margin.bottom;
const chartContainer = svg.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