-
-
Save gilesbowkett/8597870db969dd46edfd561f545389ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(asdf) | |
(defn- state-line [[state results]] | |
(let [d (->> results | |
(sort-by :year) | |
(reduce (fn [line {:keys [year from-center]}] | |
(conj line (str (x-for-margin from-center) | |
"," | |
(+ 10 (year-base year))))) | |
[]) | |
(interpose "L") | |
(concat ["M"]) | |
(str/join " "))] | |
[:path {:key state :d d :stroke "#ccc" :fill "none"}])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment