     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}
+        @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}
 

      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


  # Graph interface functions
  setXAxis: (e) =>
    console.log $(e.currentTarget).val()
    @options.xAxis = $(e.currentTarget).val()

  setYAxis: (e) =>
    console.log $(e.currentTarget).val()
    @options.yAxis = $(e.currentTarget).val()

  setGraphType: (e) =>
