     cubic: (value, max) -> Math.pow(value/max, 3)
     quartic: (value, max) -> Math.pow(value/max, 4)
     quintic: (value, max) -> Math.pow(value/max, 5)
+
+  optionListeners =
+    'option:buckets': 'bucketsChanged'
+    'option:bucketRange': 'bucketRangeChanged'
+    'option:opacity': 'opacityChanged'
+    'option:bucketPadding': 'bucketPaddingChanged'
+    'option:paintZeroValues': 'paintZeroValuesChanged'
 
   # Creates a new heatmap.
   # @param [Object] options Options for the heatmap.

    # At the end of a transition we must reset the paint canvas by shifting the viewable
    # buckets to the left (this allows for a fixed cut point and single renders below in @draw)
    @on 'transition:end', '_shiftPaintCanvas'

  # Redraws the entire heatmap for the current data.
  redraw: ->
    entryIndex = @data[0].values.length
    drawColumn = @options.windowSize
    while (--entryIndex >= 0) and (--drawColumn >= 0)
      @_paintEntry(entryIndex, drawColumn)

  # Computes the correct color for a given bucket.
  # @param [Integer] value Normalized value at the bucket.

    @ctx.drawImage @paint, delta, 0
    super()

  # Changes the number of buckets in response to an <code>option:buckets</code> event.
  bucketsChanged: ->@redraw()

# "Audio... Audio... Audio... Video Disco..." - Justice
