     @graph.height = 310
     @graph.channel = 'graph'
 
+    filter = {}
     if @options.galaxyType
-      filter = new Function "item", "return item['type'] === #{@options.galaxyType}"
-      @graph.addFilter filter
+      filter.func = new Function "item", "return item['type'] === '#{@options.galaxyType}'"
+      @graph.filters.push filter
 
     @graph.getDataSource("SkyServerSubject", @options.sampleSize)
 

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

module.exports = Graphs

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

  setDataSource: (e) =>
