       filter.func = new Function "item", "return item['type'] === '#{@options.galaxyType}'"
       @graph.filters.push filter
 
-
     @graph.getDataSource("SkyServerSubject", @options.sampleSize)
-
-
     # @histogram.getDataSource("InteractiveSubject", {sample: @options.sample, limit: parseInt(@sampleSize.val()), user: false})
 
   # Helper functions

    'click #setting-data-source button'       : 'setDataSource'
    'change #sample-size'                     : 'setSampleSize'
    'click button[type="submit"]'             : 'onSubmit'

  constructor: ->
    super

    e.preventDefault()
    @el.find('svg').empty()

    console.log @options.xAxis, @options.yAxis

    switch @options.graphType
      when "histogram"
        @graph = new Histogram {el: '#graph', width: 512, height: 310, variable: @options.xAxis}
      when "scatterplot"
        @graph = new Scatterplot {el: '#graph', xAxisKey: @options.xAxis, yAxisKey: @options.yAxis}

