Skip to content

Instantly share code, notes, and snippets.

@lisawilliams
Created March 20, 2017 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lisawilliams/9e1f8c39c9825ad30578d42da553ac52 to your computer and use it in GitHub Desktop.
Save lisawilliams/9e1f8c39c9825ad30578d42da553ac52 to your computer and use it in GitHub Desktop.
Scatterplot exercise part 4
// setup fill color
var cValue = function(d) { return d.Manufacturer;},
color = d3.scale.category10();
// add the graph canvas to the body of the webpage
var svg = d3.select("body").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// add the tooltip area to the webpage
var tooltip = d3.select("body").append("div")
.attr("class", "tooltip")
.style("opacity", 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment