      :height (.-height b)}))
 
 (defn transform-to-center
-  "Returns a transform string that will scale and center provided element {:width :height :x :y} within container {:width :height}."
+  "Returns a transform string that will scale and center provided element `{:width :height :x :y}` within container `{:width :height}`."
   [element container]
   (let [{ew :width eh :height x :x y :y} element
         {w :width h :height} container



(defn ^:cljs get-bounds
  "Returns map of {:x :y :width :height} containing SVG element bounding box.
   All coordinates are in userspace. See: http://www.w3.org/TR/SVG/types.html#InterfaceSVGLocatable"
  [$svg-el]
  (let [b (.getBBox $svg-el)]
    {:x (.-x b)



(defn axis
  "Returns axis <g> hiccup vector for provided input `scale` and collection of `ticks` (numbers).
   Direction away from the data frame is defined to be positive; use negative margins and widths to render axis inside of data frame.

   Kwargs:

   > *:orientation* &in; (`:top`, `:bottom`, `:left`, `:right`), where the axis should be relative to the data frame, defaults to `:left`

   > *:formatter* fn run on tick values, defaults to `str`

   > *:major-tick-width* width of ticks (minor ticks not yet implemented), defaults to 6

   > *:text-margin* distance between axis and start of text, defaults to 9"
  [scale ticks & {:keys [orientation
                         formatter
                         major-tick-width
