     })
     @hist_source.trigger('change', @power_source, {})
 
-  set_freq_range : (event, ui) =>
+  set_freq_range : (event, ui) ->
     [min, max] = ui.values
     @fft_xrange.set({'start': min, 'end' : max})
     return null

      #console.log "AJAX Error: #{textStatus}"
    success: (data, textStatus, jqXHR) =>
      @on_data(data)
    new_render = new Date()
    console.log("render_time", new_render - @last_render)
    @last_render = new_render
    requestAnimationFrame(
      => @request_data())

  on_data: (data) =>
    if not data[0]?
      return



    @render()

  request_data: () ->
    $.ajax 'http://localhost:5000/data',
    type: 'GET'
    dataType: 'json'
