Graph: Use a smoother scale function

The scaling is pretty much the same - it just gets rid of some stackiness caused by the `<` etc. conditions in previous code.
pull/3518/head
Moritz Ulrich 2021-12-14 13:42:20 +01:00 committed by Tienson Qin
parent b1b8405217
commit 1b7bfd6511
1 changed files with 1 additions and 7 deletions

View File

@ -40,13 +40,7 @@
(if dark? "orange" "green")
color)]
(let [n (get page-links p 1)
size-v (if (> n 2)
(js/Math.cbrt n)
n)
size-v (if (< size-v 1)
1
(int size-v))
size (* size-v 8)]
size (int (* 8 (max 1.0 (js/Math.cbrt n))))]
(cond->
{:id p
:label p