{
const svg = d3.create("svg")
.attr("width", width)
.attr("height", height)
const axisPosition = 220
const selectedIndustry = "Tech, Apps & Platforms"
svg.append("g")
.attr("transform", "translate(0,0)")
.append("rect")
.attr("width", width)
.attr("height", height)
.attr("fill", "black")
svg.append("g")
.attr("transform", `translate(0,${axisPosition})`)
.attr("color", "white")
.call(d3.axisBottom(yearScale));
svg.append("g")
.attr("transform", `translate(50,${axisPosition+30})`)
.append("text")
.attr("font-size", 16)
.attr("font-family", "Arial")
.attr("fill", "white")
.text(selectedIndustry)
const chart = svg.append("g")
.attr("transform", "translate(0,0)")
chart.selectAll("rect")
.data(data.filter(d => d.records != null).filter(d => d.industry == selectedIndustry))
.join("rect")
.attr("transform", d => `rotate(-45 ${yearScale(d.date)} ${axisPosition})`)
.attr("x", d => yearScale(d.date))
.attr("y", d => axisPosition - recordsScale(d.records))
.attr("width", d => recordsScale(d.records))
.attr("height", d => recordsScale(d.records))
.attr("fill", "rgb(20,255,20,0.3)")
.attr("stroke", "lightgreen")
chart.selectAll("circle")
.data(data.filter(d => d.industry == selectedIndustry))
.join("circle")
.attr("cx", d => yearScale(d.date))
.attr("cy", axisPosition)
.attr("r", 2)
.attr("fill", "white")
return svg.node()
}