Created
March 20, 2017 03:09
-
-
Save lisawilliams/9e1f8c39c9825ad30578d42da553ac52 to your computer and use it in GitHub Desktop.
Scatterplot exercise part 4
This file contains 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
// 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