chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
svg.selectAll('rect')
.data(dados)
.join('rect')
.attr("x", d => x(d.semana))
.attr("y", d => y(d.tmax))
.attr("width", weekWidth * .95)
.attr("height", d => y(d.tmin) - y(d.tmax))
.attr("fill", d => fill(d.tmedia))
.attr("opacity", 0.5)
svg.selectAll('circle')
.data(dados)
.join('circle')
.attr('cx', d => x(d.semana))
.attr('cy', y(12))
.attr('r', d => radius(d.chuva))
.attr('fill', d => fill(d.tmedia))
.attr('opacity', .2)
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
return svg.node();
}