diff --git a/resources/public/sample-data.edn b/resources/public/sample-data.edn index d4373a2..0f5a9aa 100644 --- a/resources/public/sample-data.edn +++ b/resources/public/sample-data.edn @@ -103,7 +103,7 @@ :colour "silver" :quantity 564243} {:id "reform" - :label "Reform UK Ltd." + :label "Reform UK" :colour "cyan" :quantity 4091549} {:id "greenew" diff --git a/src/clj/rsvggraph/core.clj b/src/clj/rsvggraph/core.clj index b8ca343..3a74901 100644 --- a/src/clj/rsvggraph/core.clj +++ b/src/clj/rsvggraph/core.clj @@ -36,7 +36,7 @@ ["M" (:x start) (:y start) "A" radius radius 0 large-arc? sweep (:x end) (:y end)]))) -(def ^:dynamic *minor-segment-threshold* 0.07) +(def ^:dynamic *minor-segment-threshold* 0.08) (defn- minor-segment? [datum] (< (- (:right datum) (:left datum)) *minor-segment-threshold*)) @@ -97,7 +97,7 @@ :font-weight "bold" :font-size (str (font-size thickness))}} [:textPath {:xlink:href (str "#" tp-id) - :startOffset "2%"} [:tspan (:label datum)]]]])) + :startOffset "2%"} [:tspan (format "%s: %.2f%%" (:label datum) (* 100 (:proportion datum)))]]]])) ;;