chart = {
const width = 430,
height = 420;
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","red")
.style("stroke-width",".8px")
.style("fill","blue")
.on("mouseover",polyHover)
.on("mouseout",polyHoverOut)
function polyHover(event,d){
d3.select(this).style("fill","purple")
svg
.append("text")
.attr("x","300")
.attr("y","100")
.attr("class","hoverText")
.style("font-size", "10px")
.attr("color", "blue")
.text(d.Name)
svg
.append("text")
.attr("x","300")
.attr("y","110")
.attr("class","hoverText")
.style("font-size", "10px")
.attr("color", "blue")
.text(d.Category)
}
p.enter().append("polyline")
.data(cobble_hill_foodmap_details)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","black")
.style("stroke-width",".7px")
.style("fill","none")
p.enter().append("polyline")
.data(cobble_hill_foodmap_buildings)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","gray")
.style("stroke-width",".5px")
.style("fill","none")
p.enter().append("polyline")
.data(cobble_hill_foodmap_parks)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","green")
.style("stroke-width",".8px")
.style("fill","none")
function polyHoverOut(){
d3.select(this).style("fill","Blue")
svg.selectAll("text.hoverText").remove()
}
return svg.node();
}