bars = {
const container = html`<svg width="900" height="850"/>`;
const svg = d3.select(container);
svg
.append('g')
.attr('class', 'bars')
.selectAll('rect')
.data(data2)
.join('rect')
.attr('class', 'bar')
.attr('x', d => x1(d.week))
.attr('y', d => y1(d.weight))
.attr('width', x1.bandwidth())
.attr('height', d => y1(0) - y1(d.weight))
.attr("fill", d => color2(d.weight));
svg
.append('g')
.attr('class', 'x-axis')
.attr('transform', `translate(0,${height - margin.bottom})`)
.call(xAxis2);
svg
.append('g')
.attr('class', 'y-axis')
.attr('transform', `translate(${margin.left},0)`)
.call(yAxis2);
svg
.append("text")
.attr("dx", width / 2 + 20)
.attr("dy", height - margin.top + 30)
.attr("text-anchor", "middle")
.text("Weeks");
svg
.append("text")
.attr("dx", margin.left - 440)
.attr("dy", height - margin.top - 763)
.style("text-anchor", "middle")
.attr("transform", "rotate(-90)")
.text("Weight");
return container;
}