Skip to content

Commit

Permalink
tweaking charts for color blind people
Browse files Browse the repository at this point in the history
  • Loading branch information
StankovicMarko committed Sep 7, 2017
1 parent 7e04f33 commit 0023852
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/clj/htembh/routes/results.clj
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
green (:green p-range)
yellow (:yellow p-range)]
(cond
(< res-p green) (add-color map "green")
(and (>= res-p green) (< res-p yellow)) (add-color map "yellow")
:else (add-color map "red")))))
(< res-p green) (add-color map "Green")
(and (>= res-p green) (< res-p yellow)) (add-color map "Yellow")
:else (add-color map "Red")))))

(defn make-total [seq]
(conj (vec seq) {:topic "TOTAL"
Expand Down
9 changes: 8 additions & 1 deletion src/cljs/htembh/components/results.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
:title {:text "Points"
:align "high"}
:labels {:overflow "justify"}}
:tooltip {:valueSuffix " points"}
:tooltip {
:headerFormat "<b>{point.x}</b><br/>"
:pointFormat "<div style=\"margin-right: 3px; margin-top: 5px; float: left; height: 5px; width: 5px; border-radius: 50%; background:{point.color}\">
</div>{series.name}: <b>{point.y} points</b><br/>Priority: <b>{point.color}</b>"
:useHTML true

}
;; {:valueSuffix " points"}
:plotOptions {:column {:dataLabels {:enabled true}}}
:legend {:layout "vertical"
:align "center"
Expand Down

0 comments on commit 0023852

Please sign in to comment.