--cięcie--
  leftContainer
    .transition()
    .call(leftAxis);

  svg
    .selectAll("rect")
    .data(data, d => d.char)
    .join(
      enter => enter
        .append("rect")
        .attr("x", xScale(0))
        .attr("y", (d, i) => yScale(d.char))
        .attr("class", d => getClass(d.char))
        .transition()
        .attr("width", d => xScale(d.count) - xScale(0))
        .attr("height", yScale.bandwidth()),
      update => update
        .transition()
        .attr("width", d => xScale(d.count) - xScale(0))
        .attr("height", yScale.bandwidth())
        .attr("y", (d, i) => yScale(d.char)),
      exit => exit
        .transition()
        .attr("width", 0)
        .attr("height", 0)
        .remove()
    );
}
--cięcie--
