       React.DOM.div {style: {width: '-webkit-min-content'}},
         graph.create_component(data, params)
 
+  brushParams: (brush) ->
+    brush.filter(({brushing}) -> !brushing).map ({extent}) ->
+      if extent?
+        start: moment(extent[0]).unix(), end: moment(extent[1]).unix()
+      else
+        {}
+
   context_vars:
     moment: moment
     CodeMirror: CodeMirror


requireables = q: Q, _: _, moment: moment, colors: colors

compat = modules.export exports, 'compat', ({doc, component_fn} ) ->
  doc 'graph',
    'Loads and graphs time-series data'
    Documentation.load_file 'compat.graph'

    else
      all_params = Server.args_to_params {args, default_options: ctx.options()}
      params = all_params.client
      if params.bindToBrush == true
        params.brush ?= new Bacon.Model
        data = bindToBrush params.brush, all_params
      else if params.bindToBrush instanceof Bacon.Observable
        data = bindToBrush params.bindToBrush, all_params
        params.brush ?= params.bindToBrush
        delete params.bindToBrush
      else
        promise = Server.get_data all_params.server

    if promise
      data = Bacon.fromPromise(promise)
