bars = {
const container = html `<svg width="900" height="500" />`
const svg = d3.select(container)
svg.append('g')
.attr('class', 'bars')
.selectAll('rect')
.data(data)
.join('rect')
.attr('class', 'bar')
.attr('x', d => xScale(d.year))
.attr('y', d => yScale(d.value))
.attr('width', xScale.bandwidth())
.attr('height', d => yScale(0) - yScale(d.value))
.style('fill', '#7472c0')
svg.append('g')
.attr('class', 'x-axis')
.attr('transform', `translate(0,${ height - margin.bottom })`)
.call(xAxis)
svg.append('g')
.attr('class', 'y-axis')
.attr('transform', `translate(${ margin.left }, 0)`)
.call(yAxis)
return container
}