You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: bar_chart.rb
    path of file: ./repos/caxlsx/lib/axlsx/drawing
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Axlsx
  # The B
    
    def to_xml_string(str = +'')
      super(str) do
        str << '<c:barChart>'
        str << '<c:barDir val="' << bar_dir.to_s << '"/>'
        str << '<c:grouping val="' << grouping.to_s << '"/>'
        str << '<c:varyColors val="' << vary_colors.to_s << '"/>'
        @series.each { |ser| ser.to_xml_string(str) }
        @d_lbls.to_xml_string(str) if @d_lbls
        str << '<c:overlap val="' << @overlap.to_s << '"/>' unless @overlap.nil?
        str << '<c:gapWidth val="' << @gap_width.to_s << '"/>' unless @gap_width.nil?
        str << '<c:shape val="' << @shape.to_s << '"/>' unless @shape.nil?
        axes.to_xml_string(str, ids: true)
        str << '</c:barChart>'
        axes.to_xml_string(str)
      end
    end