Skip to content

Instantly share code, notes, and snippets.

@pjaspers
Created May 31, 2013 12:55
Show Gist options
  • Save pjaspers/5684787 to your computer and use it in GitHub Desktop.
Save pjaspers/5684787 to your computer and use it in GitHub Desktop.
var svg = d3.select(".jumbotron").append("svg")
.attr("width", width)
.attr("height", height)
.attr("id", "chart")
// @bluecrowbar:
// These will resize the graph according to browser. Which is tres cool, but is too large at start.
// .attr("viewBox", "0 0 " + width + " " + height )
// .attr("preserveAspectRatio", "xMinYMin meet")
// .attr("style", "display: block; width: 80%; margin: 0 auto;}")
.append("g")
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment