             (map #(* % (.pow js/Math 10 scale))
                  [ 1 2 5 ]))
           (range -3 3)))
+
+(def x-line-intervals
+  (mapcat (fn [ scale ]
+            (map #(* % scale)
+                 [ 1 2 3 4 5 6 ]))
+          [1 60 3600 86400 604800]))
 
 (def stroke-styles
   {:grid

                        (range (/ (range-magnitude y-range) y-interval))))]
        (draw-y-grid-line ctx w (pixel-snap (ty y)) y (= y 0))))))

(defn draw-series [ ctx w h data x-range ]
  (with-preserved-ctx ctx
    (set-stroke-style ctx :series-line)

    (set-stroke-style ctx :frame)
    (draw-line ctx [ 0.5 0.5 ] [ 0.5 (- h 0.5) ] )))

(defn draw [ ctx w h data begin-t end-t ]
  (draw-series-background ctx w h)
  (let [w (- w y-axis-space tsplot-right-margin)
        h (- h x-axis-space)]
