# File lib/sparklines.rb, line 435
  def smooth
    step             = @options[:step].to_f
    height           = @options[:height].to_f
    width            = ((@norm_data.size - 1) * step).to_f

    background_color = @options[:background_color]
    create_canvas(width, height, background_color)

    min_color        = @options[:min_color]
    max_color        = @options[:max_color]
    last_color       = @options[:last_color]
    has_min          = @options[:has_min]
    has_max          = @options[:has_max]
    has_last         = @options[:has_last]
    line_color       = @options[:line_color]
    has_std_dev      = @options[:has_std_dev]
    std_dev_color    = @options[:std_dev_color]

    target           = @options.has_key?(:target) ? @options[:target].to_f : nil
    target_color     = @options[:target_color] || 'white'

    drawstddevbox(width,height,std_dev_color) if has_std_dev == true

    @draw.stroke(line_color)
    coords = []
    i=0
    @norm_data.each do |r|
      coords.push [ i, (height - 3 - r/(101.0/(height-4))) ]
      i += step
    end

    if @options[:underneath_color]
      closed_polygon(height, width, coords)
    else
      open_ended_polyline(coords)
    end

    unless target.nil?
      normalized_target_value = ((target.to_f - @minimum_value)/(@maximum_value - @minimum_value)) * 100.0
      adjusted_target_value = (height - 3 - normalized_target_value/(101.0/(height-4))).to_i
      @draw.stroke(target_color)
      open_ended_polyline([[-5, adjusted_target_value], [width + 5, adjusted_target_value]])
    end

    drawbox(coords[@norm_data.index(@norm_data.min)], 2, min_color) if has_min == true
    drawbox(coords[@norm_data.index(@norm_data.max)], 2, max_color) if has_max == true
    drawbox(coords[-1], 2, last_color) if has_last == true

    @draw.draw(@canvas)
    @canvas
  end