I haven’t used d3 in ClojureScript before, but here is the same example in ClojureScript (more or less a direct port of the js code):
(defn line-graph [data]
(let [arr (into-array data)
margin {:top 20 :right 20 :bottom 20 :left 30}
width (- 960 (:left margin) (:right margin))
height (- 500 (:top margin) (:bottom margin))
scale-x (-> (js/d3.scaleTime)
(.domain (js/d3.extent arr #(js/Date. (:timestamp %))))
(.range #js [0 width]))
scale-y (-> (js/d3.scaleLinear)
(.domain #js [0 (js/d3.max arr #(get % :value))])
(.range #js [height 0]))
line-fn (-> (js/d3.line)
(.x #(scale-x (js/Date. (:timestamp %))))
(.y #(scale-y (:value %))))]
[:svg {:width (+ width (:left margin) (:right margin))
:height (+ height (:top margin) (:bottom margin))}
[:g {:transform (str "translate(" (:left margin) "," (+ height (:top margin)) ")")}
[:line {:fill "none"
:stroke "lightgrey"
:stroke-width 2
:x0 0
:y0 0
:x1 width
:y1 0}]]
[:g {:transform (str "translate(" (:left margin) "," (:top margin) ")")}
[:line {:fill "none"
:stroke "lightgrey"
:stroke-width 2
:x0 0
:y0 0
:x1 0
:y1 height}]]
[:g {:transform (str "translate(" (:left margin) "," (:top margin) ")")}
[:path {:fill "none"
:stroke "steelblue"
:stroke-width 2
:d (line-fn arr)}]]]))
(def example-data
[{:timestamp "2012-05-01T00:00:00.0Z", :value 58.13},
{:timestamp "2012-04-30T00:00:00.0Z", :value 53.98},
{:timestamp "2012-04-27T00:00:00.0Z", :value 67.00},
{:timestamp "2012-04-26T00:00:00.0Z", :value 89.70},
{:timestamp "2012-04-25T00:00:00.0Z", :value 99.00},
{:timestamp "2012-04-24T00:00:00.0Z", :value 130.28},
{:timestamp "2012-04-23T00:00:00.0Z", :value 166.70},
{:timestamp "2012-04-20T00:00:00.0Z", :value 234.98},
{:timestamp "2012-04-19T00:00:00.0Z", :value 345.44},
{:timestamp "2012-04-18T00:00:00.0Z", :value 443.34},
{:timestamp "2012-04-17T00:00:00.0Z", :value 543.70},
{:timestamp "2012-04-16T00:00:00.0Z", :value 580.13},
{:timestamp "2012-04-13T00:00:00.0Z", :value 605.23},
{:timestamp "2012-04-12T00:00:00.0Z", :value 622.77},
{:timestamp "2012-04-11T00:00:00.0Z", :value 626.20},
{:timestamp "2012-04-10T00:00:00.0Z", :value 628.44},
{:timestamp "2012-04-09T00:00:00.0Z", :value 636.23},
{:timestamp "2012-04-05T00:00:00.0Z", :value 633.68},
{:timestamp "2012-04-04T00:00:00.0Z", :value 624.31},
{:timestamp "2012-04-03T00:00:00.0Z", :value 629.32},
{:timestamp "2012-04-02T00:00:00.0Z", :value 618.63},
{:timestamp "2012-03-30T00:00:00.0Z", :value 599.55},
{:timestamp "2012-03-29T00:00:00.0Z", :value 609.86},
{:timestamp "2012-03-28T00:00:00.0Z", :value 617.62},
{:timestamp "2012-03-27T00:00:00.0Z", :value 614.48},
{:timestamp "2012-03-26T00:00:00.0Z", :value 606.98}])