     else if args[0] instanceof Bacon.Observable
       data = args[0]
       params = _.extend {}, ctx.options(), args[1]
-    else if args[0] instanceof Server.LeadDataSource
-      # TODO opentsdb won't like some of these params
-      params = _.extend {}, ctx.options(), args[1]
-      if params.bindToBrush == true
-        params.brush ?= new Bacon.Model
-        data = bindToBrush params.brush, args[0]
-      else if params.bindToBrush instanceof Bacon.Observable
-        data = bindToBrush params.bindToBrush, args[0]
-      else
-        promise = args[0].load params
-    else
-      all_params = Server.args_to_params {args, default_options: ctx.options()}
-      params = all_params.client
-      source = new Server.LeadDataSource (brushParams) ->
-        Server.get_data _.extend {}, all_params.server, brushParams
+    else
+      if args[0] instanceof Server.LeadDataSource
+        source = args[0]
+        # TODO opentsdb won't like some of these params
+        params = _.extend {}, ctx.options(), args[1]
+      else
+        all_params = Server.args_to_params {args, default_options: ctx.options()}
+        params = all_params.client
+        source = serverDataSource(all_params.server)
+
       if params.bindToBrush == true
         params.brush ?= new Bacon.Model
         data = bindToBrush params.brush, source
       else if params.bindToBrush instanceof Bacon.Observable
         data = bindToBrush params.bindToBrush, source
         params.brush ?= params.bindToBrush
-        delete params.bindToBrush
-      else
-        promise = Server.get_data all_params.server
+      else
+        promise = source.load params
 
     if promise
       data = Bacon.fromPromise(promise)

      brush = args[1]?.brush ? ctx.options().brush
    else
      allParams = Server.args_to_params {args, default_options: ctx.options()}
      source = new Server.LeadDataSource (brushParams) ->
        Server.get_data _.extend {}, allParams.server, brushParams
      brush = allParams.client.brush
    Context.value bindToBrush brush, source

  doc 'graph',
    'Loads and graphs time-series data'
    Documentation.load_file 'graphing.graph'

  component_fn 'graph', (ctx, args...) ->
    if Q.isPromise args[0]


    Bacon.combineTemplate params

  bindToBrush = (brush, source) ->
    sourceParams = new Bacon.Model null
    sourceParams.addSource brushParams(brush)

    sourceParams.flatMapLatest (params) ->
      Bacon.fromPromise(source.load(params))

  fn 'bindToBrush', (ctx, args...) ->
    if args[0] instanceof Server.LeadDataSource
