chart = {
const width = 1500,
height = 1500;
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","orange")
.style("stroke-width","3px")
.style("fill","yellow")
.on("mouseover",polyHover)
.on("mouseout",polyHoverout)
function polyHover(event,d){
d3.select(this).style("fill","purple")
d3.select(this).style("stroke","blue")
svg
.append("text")
.attr("x","100")
.attr("y","100")
.text("I love CASE")
}
function polyHoverout(){
d3.select(this).style("fill","yellow")
d3.select(this).style("stroke","orange")
svg.SelectAll("text.hoverText").remove()
}
return svg.node()
}