chart = {
const width = 1200,
height = 810;
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
var g = svg.append("g").attr("id", "paths");
var p = svg.selectAll("polyline")
.data(outlines)
.enter()
.append("polyline")
.attr("points", function(d) {return d.pts})
.style("stroke","black")
.style("stroke-width","1px")
.style("fill","gray")
.on("mouseover",polyHover)
.on("mouseout",polyHoverOut)
function polyHover(event,d){
d3.select(this).style("fill","purple")
svg
.append("text")
.attr("x","100")
.attr("y","100")
.attr("class","hoverText")
.text(d.sf)
svg
.append("text")
.attr("x","100")
.attr("y","115")
.attr("class","hoverText")
.text(d.occ)
.text("I love CASE 😀")
}
p.enter().append("polyline")
.data(cobble_hill_win)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","white")
.style("stroke-width",".7px")
.style("fill","gray")
p.enter().append("polyline")
.data(detailline)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","black")
.style("stroke-width","1px")
.style("fill","white")
function polyHoverOut(){
d3.select(this).style("fill","gray")
svg.selectAll("text.hoverText").remove()
}
return svg.node();
}