createsection = section => {
let ds = section.datum();
let ix = x(ds.values);
let iy = y(ds.values);
section.append('text').attr('class', 'head')
.text(d => d.key);
section.append('g').attr('class', 'axis x')
.attr('transform', d => `translate(0, ${vsection.bandwidth() - margin.bottom})`)
.call(g => {
g.call(d3.axisBottom(ix).tickSizeOuter(0));
});
section.append('g').attr('class', 'axis y')
.attr('transform', d => `translate(${margin.left}, 0)`)
.call(g => {
g.call(d3.axisLeft(iy));
});
section.append('g').attr('class', 'plot')
.selectAll('rect').data(ds.values)
.join('rect')
.attr('x', d => ix(d.name))
.attr('y', d => iy(d.value))
.attr('height', d => iy(0) - iy(d.value))
.attr('width', ix.bandwidth());
}