score:0

Accepted answer

I've solved my problem

let mwidth = xInScale.bandwidth() * 3 / 2
              let label = newBarGroup
              .append('text')
              .text((d) => {
                console.log(d.key)
                  return d.key
              })
              .style('transform', `translate(${mwidth}px, 350px)`)
              .attr("dy", "0em")
              .style('font-size', 12)
              .style('text-anchor', 'middle')
              .call(wrap, 80);

Related Query