       .attr 'r', @peakR
 
   init: ->
-    console.log 'HeyGuys'
     @modelStats @stats
+    console.log 'initialized!'
 
   resize: =>
     @width = parseInt(d3.select('.js-landing-graph').style('width')) - (@margin.left) - (@margin.right)

    # Update the range of the scale with new width/height
    @xScale.range [
      0
      width
    ]
    @yScale.range [
      height
      0
    ]
    # Force D3 to recalculate and update the line
    svg.selectAll('path').attr 'd', area

    rightX = @xScale(@maxElem.date) + peakR * 2
    if (@textLength + rightX) > width
      svg.select('.landing-graph__text').attr 'x', @xScale(@maxElem.date) - @textLength - peakR * 2
    else
      svg.select('.landing-graph__text').attr 'x', rightX
      
    svg.select('.landing-graph__circle').attr 'cx', @xScale(@maxElem.date)

landingUserStatsInitialize = =>
  return if !landingUserStatsElements[0]?

  landingUserStatsElements[0].chart ?= new LandingUserStats
  landingUserStatsElements[0].chart?.init()

landingUserStatsResize = =>
  return if !landingUserStatsElements[0]?

  landingUserStatsElements[0].chart?.resize()

$(window).on 'throttled-resize', landingUserStatsResize
$(document).on 'turbolinks:load', landingUserStatsInitialize

    #Find the date for the max, from the end backward
    i = data.length - 1
    # console.log i, @maxElem
    while i >= 0
      if @maxElem == null or data[i].users_osu > @maxElem.users_osu
        @maxElem = data[i]
