barChart = {
const scale = 0.60
const barWidth = 15
const container = d3.select(DOM.svg(width+margin.left+margin.right,
height+margin.top+margin.bottom))
const barGroup = container
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
.style("font", "12px Roboto")
barGroup.selectAll("nodes")
.data(nodes)
.join("rect")
.attr("x", d => xScale(d.Season))
.attr("y", d => -600)
.attr("width", barWidth)
.attr("height", d => d.Resorts * scale)
.attr("fill", "white")
.attr("id", d => d.id)
.transition()
.ease(d3.easeLinear)
.duration((d,i) => i*200)
.attr("fill", "lightblue")
.attr("y", d => height - d.Resorts * scale - 40);
barGroup.selectAll("nodeResorts")
.data(nodes)
.enter().append("text")
.attr("x", d => xScale(d.Season))
.attr("y", d => height - d.Resorts * scale - 50)
.attr("fill", "#fff")
.attr("opacity","0")
.text(d => d.Resorts)
.transition()
.ease(d3.easeBackIn)
.duration(8000)
.attr("opacity", "100")
.attr("fill", "#555");
barGroup.selectAll("nodeLabels")
.data(nodes)
.enter().append("text")
.attr("x", d => xScale(d.Season) + 15)
.attr("y", height-20)
.attr("fill", "black")
.style("text-anchor", "middle")
.text(d => d.Season)
barGroup.append("text")
.text('Number of US Ski Resorts in Operation Per Season')
.attr("opacity", "0.8")
.style("font", "16px Roboto");
return container.node();
}