 
   setGalaxyType: (e) =>
     button = $(e.currentTarget)
-    @options.galaxyType = button.data('type')
+    if button.hasClass 'pressed'
+      @options.galaxyType = null
+    else
+      @options.galaxyType = button.data('type')
     @setPressed button
 
   setDataSource: (e) =>

  # Helper functions
  setPressed: (button) =>
    button.siblings().removeClass 'pressed'
    button.addClass 'pressed'
   

module.exports = Graphs
    @graph.height = 310
    @graph.channel = 'graph'

    filter = {}
    if @options.galaxyType
      filter.func = new Function "item", "return item['type'] === '#{@options.galaxyType}'"
      @graph.filters.push filter

    @graph.getDataSource("SkyServerSubject", @options.sampleSize)

