     @headingText.html @action_title
     $('[data-link="graphs"]').removeClass 'pressed'
 
+  setGraph: =>
+    if @options.graphType is 'histogram'
+      @xAxisItem.find('label').html 'I\'d like to see...'
+      @graph = new Histogram { el: '#graph', channel: 'graph', height: 310, width: 512 } 
+    else
+      @xAxisItem.find('label').html 'I\'d like to see how...'
+      @graph = new Scatterplot { el: '#graph', channel: 'graph', height: 310, width: 512 } 
+
+
   # Graph interface functions
   setGraphType: (e) =>
     button = $(e.currentTarget)

    @setPressed $('[data-source="group"]')
    @setPressed $("[data-variables=\"#{@options.graphType}\"]")

    if $(e.currentTarget).data('variables') is 'histogram'
      @xAxisItem.find('label').html 'I\'d like to see...'

    @graph.data = new Array
    @graph.filteredData = new Array
    @graph.filters = new Array

  # Image Generation
  generateImageFromGraph: (e) =>

    @el.find('svg').empty()
    @reset()

    @setGraph()

    console.log @graph

  setXAxis: (e) =>
    @options.xAxis = $(e.currentTarget).val()
