chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
var formatSuffixDecimal2 = d3.format(".2s")
const tooltip = d3tip()
.style('position', 'absolute')
.style('text-align', 'center')
.style('width', '60px')
.style('height', '38px')
.style('padding', '2px')
.style('font', '14px sans-serif')
.style('background', 'white')
.style('border', '0px')
.style('border-radius', '8px')
.style('pointer-events', 'none')
.html(d =>
`<div style='float: right'>
Value: ${formatSuffixDecimal2((y(d[0]) - y(d[1]))*233330)}
</div>`)
;
svg.call(tooltip);
svg.append("g")
.selectAll("g")
.data(series)
.join("g")
.attr("fill", d => color(d.key))
.selectAll("rect")
.data(d => d)
.join("rect")
.attr("x", (d, i) => x(d.data.name))
.attr("y", d => y(d[1]))
.attr("height", d => y(d[0]) - y(d[1]))
.attr("width", x.bandwidth())
.on('mouseover', tooltip.show)
.on('mouseout', tooltip.hide)
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
return svg.node();
}