def data(name, data_points=[], color=nil)
      data_points = Array(data_points) # make sure it's an array
      @data << [name, data_points, color]
                                       # Set column count if this is larger than previous counts
      @column_count = (data_points.length > @column_count) ? data_points.length : @column_count

      # Pre-normalize
      data_points.each do |data_point|
        next if data_point.nil?

        # Setup max/min so spread starts at the low end of the data points
        if @maximum_value.nil? && @minimum_value.nil?
          @maximum_value = @minimum_value = data_point
        end

        # TODO Doesn't work with stacked bar graphs
        # Original: @maximum_value = larger_than_max?(data_point, index) ? max(data_point, index) : @maximum_value
        @maximum_value = larger_than_max?(data_point) ? data_point : @maximum_value
        @has_data = true if @maximum_value >= 0

        @minimum_value = less_than_min?(data_point) ? data_point : @minimum_value
        @has_data = true if @minimum_value < 0
      end
    end
def data(name, data_points=[], color=nil)
      data_points = Array(data_points) # make sure it's an array
      @data << [name, data_points, color]
                                       # Set column count if this is larger than previous counts
      @column_count = (data_points.length > @column_count) ? data_points.length : @column_count

      # Pre-normalize
      data_points.each do |data_point|
        next if data_point.nil?

        # Setup max/min so spread starts at the low end of the data points
        if @maximum_value.nil? && @minimum_value.nil?
          @maximum_value = @minimum_value = data_point
        end

        # TODO Doesn't work with stacked bar graphs
        # Original: @maximum_value = larger_than_max?(data_point, index) ? max(data_point, index) : @maximum_value
        @maximum_value = larger_than_max?(data_point) ? data_point : @maximum_value
        @has_data = true if @maximum_value >= 0

        @minimum_value = less_than_min?(data_point) ? data_point : @minimum_value
        @has_data = true if @minimum_value < 0
      end
    end
Parameters are an array where the first element is the name of the dataset
 and the value is an array of values to plot.

 Can be called multiple times with different datasets for a multi-valued
 graph.

 If the color argument is nil, the next color from the default theme will
 be used.

 NOTE: If you want to use a preset theme, you must set it before calling
 data().

 Example:
   data("Bart S.", [95, 45, 78, 89, 88, 76], '#ffcc00')