chart = {
const width = 1100,
height = 600;
const svg = d3.create("svg")
.attr("viewBox", [65, 35, width-100, height-100]);
var projection = d3
.geoMercator()
.fitSize([width - 50, height - 50], bbox1);
var path1 = d3.geoPath().projection(projection);
var path2 = d3.geoPath().projection(projection);
var path3 = d3.geoPath().projection(projection);
var path4 = d3.geoPath().projection(projection);
var g = svg.append("g").attr("id", "paths");
svg.append('image')
.attr('href',view)
.attr('class','spotImage')
.attr('x', '-21')
.attr('y','14')
.attr('width', 1100)
.attr('height', 550)
g.selectAll("path3")
.data(harvest.features)
.enter()
.append("path")
.attr('class','outlines')
.attr("d", path3)
.style("fill", "green")
.style("fill-opacity", ".25")
.style('stroke-opacity','0')
.style("stroke-width", '.5')
.style("stroke", "black")
var c = svg.selectAll("circle")
.data(reefs.features)
.enter()
.append("circle")
.attr("cx", function(d) {return path1.centroid(d)[0]})
.attr("cy", function(d) {return path1.centroid(d)[1]})
.attr('r',6)
.style('fill','white')
.style('fill-opacity','1')
.style("stroke-width", '2')
.style("stroke", "black")
.on('mouseover',fireText)
.on('mouseout',removefireText)
function fireText(event,d){
console.log(d)
svg
.append("text")
.attr('x','90')
.attr('y','120')
.attr('class','mypoints_position')
.style('font-family','garamond')
.style('font-size','16px')
.style('font-weight','light')
.text(d.properties.name)
var wrap = svg.selectAll("text.mypoints_position")
.each(function(d, i) { wrap_text(d3.select(this), 100) });
svg
.append("line")
.attr('x1','90')
.attr('y1','120')
.attr('x2', path1.centroid(d)[0])
.attr('y2', path1.centroid(d)[1])
.attr('class','fireLine')
.style("stroke-width", '.25')
.style("stroke", "rgb(0,0,0)")
.style('stroke-dasharray', '6 4')
}
function removefireText(){
d3.selectAll('text.mypoints_position').remove()
d3.selectAll('line.fireLine').remove()
}
svg
.append("text")
.attr('x','878')
.attr('y','195')
.style('font-family','garamond')
.style('font-size','12px')
.style('font-weight','light')
.text('26 Years: 52,316 FT')
svg
.append("text")
.attr('x','878')
.attr('y','145')
.style('font-family','garamond')
.style('font-size','12px')
.style('font-weight','light')
.text('15 Years: 30,300 FT')
svg
.append("text")
.attr('x','878')
.attr('y','96')
.style('font-family','garamond')
.style('font-size','12px')
.style('font-weight','light')
.text('5 Years: 10,100 FT')
svg
.append("text")
.attr('x','708')
.attr('y','78')
.style('font-family','garamond')
.style('font-size','14px')
.style('font-weight','bold')
.text('Lake Borgne Reef Proposal')
svg
.append("text")
.attr('x','825')
.attr('y','245')
.style('font-family','garamond')
.style('font-size','14px')
.style('font-weight','bold')
.text('New Orleans')
svg
.append("line")
.attr('x1','825')
.attr('y1','245')
.attr('x2','775')
.attr('y2','275')
.style("stroke-width", '1')
.style("stroke", "rgb(0,0,0)")
svg
.append("text")
.attr('x','90')
.attr('y','75')
.style('font-family','garamond')
.style('font-size','24px')
.style('font-weight','bold')
.text('Louisiana Oyster Reefs')
svg
.append("text")
.attr('x','140')
.attr('y','470')
.style('font-family','garamond')
.style('font-size','14px')
.style('font-weight','bold')
.text('Oyster Harvest Regions')
svg
.append("text")
.attr('x','90')
.attr('y','100')
.style('font-family','garamond')
.style('font-size','18px')
.style('font-weight','bold')
.text('Existing Oyster Reefs:')
svg
.append("line")
.attr('x1','90')
.attr('y1','82.5')
.attr('x2','333')
.attr('y2','82.5')
.style("stroke-width", '1')
.style("stroke", "rgb(0,0,0)")
return svg.node();
}