def add_series(params)
      # Check that the required input has been specified.
      unless params.has_key?(:values)
        raise "Must specify ':values' in add_series"
      end

      if @requires_category != 0 && !params.has_key?(:categories)
        raise  "Must specify ':categories' in add_series for this chart type"
      end

      @series << Series.new(self, params)

      # Set the secondary axis properties.
      x2_axis = params[:x2_axis]
      y2_axis = params[:y2_axis]

      # Store secondary status for combined charts.
      if ptrue?(x2_axis) || ptrue?(y2_axis)
        @is_secondary = true
      end

      # Set the gap and overlap for Bar/Column charts.
      if params[:gap]
        if ptrue?(y2_axis)
          @series_gap_2 = params[:gap]
        else
          @series_gap_1 = params[:gap]
        end
      end

      # Set the overlap for Bar/Column charts.
      if params[:overlap]
        if ptrue?(y2_axis)
          @series_overlap_2 = params[:overlap]
        else
          @series_overlap_1 = params[:overlap]
        end
      end
    end
def add_series(params)
      # Check that the required input has been specified.
      unless params.has_key?(:values)
        raise "Must specify ':values' in add_series"
      end

      if @requires_category != 0 && !params.has_key?(:categories)
        raise  "Must specify ':categories' in add_series for this chart type"
      end

      @series << Series.new(self, params)

      # Set the secondary axis properties.
      x2_axis = params[:x2_axis]
      y2_axis = params[:y2_axis]

      # Store secondary status for combined charts.
      if ptrue?(x2_axis) || ptrue?(y2_axis)
        @is_secondary = true
      end

      # Set the gap and overlap for Bar/Column charts.
      if params[:gap]
        if ptrue?(y2_axis)
          @series_gap_2 = params[:gap]
        else
          @series_gap_1 = params[:gap]
        end
      end

      # Set the overlap for Bar/Column charts.
      if params[:overlap]
        if ptrue?(y2_axis)
          @series_overlap_2 = params[:overlap]
        else
          @series_overlap_1 = params[:overlap]
        end
      end
    end
Add a series and it's properties to a chart.