<commit_before>module SmartChart
  class Bar < MultipleDataSetChart
  
    # bar width (in pixels)
    attr_accessor :bar_width
    
    # space between bars (in pixels)
    attr_accessor :bar_space
    
    # space between bar groups (in pixels)
    attr_accessor :bar_group_space
    
    
    private # ---------------------------------------------------------------
    
    ##
    # Specify the Google Chart type.
    #
    def type
      "b" +
        (orientation == :horizontal ? "h" : "v") +
        (style       == :stacked    ? "s" : "g")
    end
    
    ##
    # Google's default bar width.
    #
    def default_bar_width
      23
    end
    
    ##
    # Google's default bar width.
    #
    def default_bar_space
      8
    end
    
    ##
    # Google's default bar width.
    #
    def default_bar_group_space
      8
    end
    
    ##
    # Array of all possible query string parameters.
    #
    def query_string_params
      super + [:chbh]
    end

    # bar width and spacing
    def chbh
      # use bar_space default for group default if only one data set
      group_default = data_values.size == 1 ?
        bar_space : default_bar_group_space
      [
        bar_width       || default_bar_width,
        bar_space       || default_bar_space,<commit_msg>Use 'a' for default bar width.<commit_after>module SmartChart
  class Bar < MultipleDataSetChart
  
    # bar width (in pixels)
    attr_accessor :bar_width
    
    # space between bars (in pixels)
    attr_accessor :bar_space
    
    # space between bar groups (in pixels)
    attr_accessor :bar_group_space
    
    
    private # ---------------------------------------------------------------
    
    ##
    # Specify the Google Chart type.
    #
    def type
      "b" +
        (orientation == :horizontal ? "h" : "v") +
        (style       == :stacked    ? "s" : "g")
    end
    
    ##
    # Default bar width.
    #
    def default_bar_width
      "a" # Google's default width is 23
    end
    
    ##
    # Default bar spacing.
    #
    def default_bar_space
      8
    end
    
    ##
    # Default bar group spacing.
    #
    def default_bar_group_space
      8
    end
    
    ##
    # Array of all possible query string parameters.
    #
    def query_string_params
      super + [:chbh]
    end

    # bar width and spacing
    def chbh
      
      # use bar_space default for group default if only one data set
      group_default = data_values.size == 1 ?
        bar_space : default_bar_group_space
      [
        bar_width       || default_bar_width,
        bar_space       || default_bar_space,
{'fraction_non_alphanumeric': 0.11854684512428298, 'fraction_numerical': 0.0038240917782026767, 'mean_word_length': 1.5250965250965252, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7032490', 'n_tokens_mistral': 791, 'n_tokens_neox': 773, 'n_words': 219}