Skip to content

Commit

Permalink
fixed setting chart dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
yogthos committed Aug 2, 2012
1 parent b227252 commit 6ffaf7a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/clj_pdf/core.clj
Expand Up @@ -388,8 +388,19 @@

(defn- chart [& params]
(let [meta (first params)
{:keys [page-width page-height]} meta]
(image (assoc meta
{:keys [align width height page-width page-height]} meta]
(image
(cond
(and align width height) meta
(and width height) (assoc meta :align :center)
align (assoc meta :width (* 0.85 page-width) :height (* 0.85 page-height))
:else
(assoc meta
:align :center
:width (* 0.85 page-width)
:height (* 0.85 page-height)))

#_ (assoc meta
:align :center
:width (* 0.85 page-width)
:height (* 0.85 page-height))
Expand Down

0 comments on commit 6ffaf7a

Please sign in to comment.