       i++
 
     # Init color functions
+    @colorKey = @initColorKey()
     @color = @initColor()
-    @colorKey = @initColorKey()
 
     # Init the svg element
     @renderSvg(group)

        color

  initColor: ->
    d3.scale
      .linear()
      .range(['#acd5f2', '#254e77'])
      .domain([0, @highestValue])

  initColorKey: ->
    d3.scale

      .attr 'class', 'user-contrib-cell js-tooltip'
      .attr 'fill', (stamp) =>
        if stamp.count isnt 0
          @color(Math.min(stamp.count, 40))
        else
          '#ededed'
      .attr 'data-container', 'body'
