{
const svg = d3.create('svg')
.attr('width', width)
.attr('height', height);
const xAxis = d3.axisBottom(x)
.tickFormat(d3.timeFormat('%B'));
svg.append('g')
.attr('transform', `translate(0,${height - margin.bottom})`)
.call(xAxis);
const yAxis = d3.axisLeft(y);
svg.append('g')
.attr('transform', `translate(${margin.left})`)
.call(yAxis)
.call(g => g.select('.domain').remove())
.append('text')
.attr('fill', 'black')
.attr('text-anchor', 'start')
.attr('dominant-baseline', 'hanging')
.attr('font-weight', 'bold')
.text('Collision Injuries, 2019');
svg.append('path')
.attr('stroke', 'steelblue')
.attr('stroke-width', 2)
.attr('fill', 'none')
.attr('d', line(injuriesByMonth));
return svg.node();
}