         ymax (apply max ys)
         yrange (- ymax ymin)
         ys' (map #(/ (- % ymin) yrange) ys)]
-    [:div
-      [:div {:style (str "color: " color-grey-2 ";") }
-        [:div {:style "display: inline-block; position: relative; margin-left: 30px;" }
+    (render-html-to-png
+      [:div {:style (str font-style "color: " color-grey-2 ";") }
+        [:div {:style "display: inline-block; position: relative; margin-left: 40px;" }
           [:div {:style "position: relative;"}
             [:div {:style "position: absolute; height: 100%; text-align: right; background-color: red;"}
-              [:div {:style "position: absolute; top: 0; right: 0;"} (format-number-short ymax)]
+              [:div {:style "position: absolute; right: 0;"} (format-number-short ymax)]
               [:div {:style "position: absolute; top: 150px; right: 0;"} (format-number-short ymin)]]
-            [:img {:style "display: block; left: 20px;" :src (render-img (render-sparkline-to-png xs' ys' 285 150))}]
+            [:img {:style "display: block; left: 20px;" :src (render-img-data-uri (render-sparkline-to-png xs' ys' 275 150))}]
           ]
           [:div
             [:div {:style (str "height: 15px; margin-left: 10px; margin-right: 10px; border: 4px solid " color-grey-1 "; border-top: none; border-bottom: none;")} "&#160;"]

(defn card-href
  [card]
  (h (str (setting/get :-site-url) "/card/" (:id card) "?clone")))

(defn render-button
  [text href icon render-img]

    (log/warn (str "Pulse card render error:" e))
    [:div {:style (str font-style "color: #EF8C8C; font-weight: 700;")} "An error occurred while displaying this card."])))

(defn- render-pulse-section
  [render-img {:keys [card result]}]
  [:div {:style "margin-top: 10px; margin-bottom: 20px;"}
