Advertisement
Guest User

Untitled

a guest
Dec 9th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns charts
  2.   (:refer-clojure :exclude [partition]) ;;avoid name conflict with base "partition" function
  3.   (:use [c2.core :only [unify]]))
  4.  
  5. (def css (str "
  6.              body { background-color:white;}
  7.              .coordinate-axes line {stroke:black}
  8.              .data line {stroke:black; stroke-width: 10px;}
  9.              "
  10. ))
  11.  
  12.  
  13. (let []
  14.   [:svg [:style {:type "text/css"} (str "<![CDATA[" css "]]>")]
  15.    [:g.plot
  16.     [:g.coordinate-axes
  17.        [:line {:x1 20 :y1 50 :x2 20 :y2 300}]
  18.        [:line {:x1 20 :y1 300 :x2 620 :y2 300}]
  19.      ]
  20.     ]]
  21. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement