     [selected-author week-stat data]
     [:td [:a {:href (str "?author=" selected-author "&week=" (:week week-stat))} data]])
 
+(defn graph-for-authors-data
+    [authors selected-author]
+    (for [author authors]
+         (if (= (:author author) selected-author)
+             (str "{data:[[1," (:commits_count author) "]], label: '" (:author author) "', pie:{explode:20}},\n")
+             (str "{data:[[1," (:commits_count author) "]], label: '" (:author author) "'},\n"))))
+
+(defn graph-for-weeks-stat
+    [weeks-stat who what label]
+    (str "{data:["
+        (apply str (for [week-stat weeks-stat]
+            (str "[" (:week week-stat) "," (get (get week-stat who) what) "],"))) "], label: '" label "'}"))
+
 (defn create-html-page
     [authors selected-author weeks-stat selected-week stat-for-week commit-id commit-info]
     (page/xhtml

                        [:td (:insertions author)]
                        [:td (:deletions author)]
                    ])
                ]
            [:h1 "Week stat"]
                [:table {:style "border:2px solid brown"}

            [:title "Stats"]
            [:meta {:name "Generator" :content "Clojure"}]
            [:meta {:http-equiv "Content-type" :content "text/html; charset=utf-8"}]
            [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/lib/prototype-1.6.0.2.js"}]
            [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/lib/canvas2image.js"}]
            [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/lib/canvastext.js"}]
            [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/flotr.debug-0.2.0-alpha.js"}]
        ]
        [:body
            [:h1 "Authors"]
