   Graph = React.createFactory React.createClass
     displayName: 'graph'
     getInitialState: ->
-      todoTotals: [] 
+      data: []
     update: (url) ->
       $.get url, ((result) ->
         data = result
-        @setState {todoTotals: data}).bind(this)
+        @setState {data: data}).bind(this)
     componentDidMount: ->
       @update("#{@props.urlbase}/#{@props.daysBack}")
     componentWillReceiveProps: (nextProps) ->
       @update("#{nextProps.urlbase}/#{nextProps.daysBack}")
     render: ->
       linechart
-        data: @state.todoTotals
+        data: @state.data
         margin:
           top: 5
           right: 15

  Histograph = React.createFactory React.createClass
    displayName: 'histograph'
    getInitialState: ->
      todoTotals: [] 
    update: (url) ->
      $.get url, ((result) ->
        data = result
        @setState {todoTotals: data}).bind(this)
    componentDidMount: ->
      @update("#{@props.urlbase}/#{@props.daysBack}")
    componentWillReceiveProps: (nextProps) ->
      @update("#{nextProps.urlbase}/#{nextProps.daysBack}")
    render: ->
      histogram
        data: @state.todoTotals
        margin:
          top: 5
          right: 15

    render: ->
      div {}, [
        (React.DOM.label htmlFor: "timeinput", "Days back in time"),
        (React.DOM.input
          className: "u-full-width"
          placeholder: "60"
          id: "timeinput"
