chart = {
let svg = d3.select(DOM.svg(width + margin.left + margin.top, height + margin.top + margin.bottom))
let barCenter = horzScale.bandwidth() / 2;
let chart = svg.append("g").classed("chart", true).attr("transform", `translate(${margin.left}, ${margin.top})`)
chart.selectAll("rect.bar")
.data(dataset)
.join("rect")
.classed("bar", true)
.attr("x", (d)=>horzScale(d[0]))
.attr("y", (d)=>vertScale(d[1]))
.attr("width", horzScale.bandwidth())
.attr("height", (d)=>(height - vertScale(d[1])))
.attr("fill", "gray")
var popup = null;
chart.selectAll("circle.lollipop")
.data(dataset)
.join("circle")
.classed("lollipop", true)
.attr("cx", (d)=>(horzScale(d[0])+barCenter))
.attr("cy", (d)=>(vertScale(d[1])))
.attr("r", 10)
.attr("fill", "steelblue")
.style("cursor", "pointer")
.on("mouseover", function(event, d){
let x = horzScale(d[0]) + barCenter,
y = vertScale(d[1])
popup.attr("transform", `translate(${x}, ${y}) rotate(-10)`)
callout(popup, [d[0], revenueFormat(d[1])])
})
.on("mouseout", function(){
popup.style("display", "none")
})
chart.call(horzAxis)
chart.call(vertAxisLeft)
chart.call(vertAxisRight)
popup = chart.append("g").classed("popup", true);
return svg.node();
}