{
const margin = { top : 10, right: 40, bottom: 30, left: 40 },
width = 700 - margin.left - margin.right,
height = 400 - margin.top - margin.bottom;
const monSvg = d3.create("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
const graphiques = monSvg.append("g")
.attr("transform", `translate(${margin.left},${margin.top})`);
const domainX = new Set(dataCount.map(d => d.provider_name));
const domainY = [0, d3.max(dataCount, d => d.count)];
const xScale = d3.scaleBand()
.domain(domainX)
.range([0, width])
.paddingInner(0.5);
const yScale = d3.scaleLinear()
.domain(domainY)
.range([height, 0])
graphiques
.selectAll('rect')
.data(dataCount)
.join(enter => enter.append('rect')
.attr('x', d => xScale(d.provider_name))
.attr('y', d => yScale(d.count) )
.attr('width', xScale.bandwidth())
.attr('height', d => yScale(0) - yScale(d.count)));
const axisBottom = d3.axisBottom(xScale)
const xAxis = graphiques.append('g')
.attr("transform", `translate(0,${height})`)
.call(axisBottom)
yield monSvg.node();
}