chart = {
const width = 400,
height = 475;
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",".5px")
.style("fill","blue")
.on("mouseover",polyHover)
.on("mouseout",polyHoverOut)
function polyHover(event,d){
console.log("hello studious students")
d3.select(this).style("fill","purple")
svg
.append("text")
.attr("x","235")
.attr("y","40")
.attr("class","hoverText")
.style("font-size", "10px")
.attr("color", "blue")
.text(d.Name)
svg
.append("text")
.attr("x","235")
.attr("y","50")
.attr("class","hoverText")
.style("font-size","10px")
.attr("color","blue")
.text(d.Category)
}
p.enter().append("polyline")
.data(finacial_district_foodmap_roads)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","black")
.style("stroke-width",".5px")
.style("fill","none")
p.enter().append("polyline")
.data(finacial_district_foodmap_buildingdet)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","gray")
.style("stroke-width",".3px")
.style("fill","none")
p.enter().append("polyline")
.data(finacial_distict_foodmap_parks)
.enter()
.append("polyline")
.attr("points", function(d) {return d})
.style("stroke","green")
.style("stroke-width",".3px")
.style("fill","none")
function polyHoverOut(event, d) {
d3.select(this).style("fill","blue")
svg.selectAll("text.hoverText").remove()
}
return svg.node();
}