 $ ->
   weeks = []
   artists = []
+  data = {}
 
   socket = io.connect('http://' + document.domain + ':' + location.port)
 

    chart = $('#chart').highcharts()
    for [artist, count] in pairs
      if artist not in artists
        artists.push(artist)
        chart.addSeries
          name: artist
          data: (0 for __ in weeks)
        , false
      seriesIndex = artists.indexOf(artist)
      pointsIndex = weeks.indexOf(timestamp)
      chart.series[seriesIndex].points[pointsIndex].update(y: count, false)
    chart.redraw()

  $('#submit').click ->
    username = $('#username').val().trim()
    timeRange = $('#time-range li.active').attr('id')
    fromDate = switch timeRange

    yAxis:
      title:
        text: 'Percent'
    legend:
      enabled: false
    plotOptions:
      area:
        stacking: 'percent'
