onomastics-ng: fix title and color alpha
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Data.Maybe (fromMaybe)
|
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import qualified Data.Text.IO as Text
|
import qualified Data.Text.IO as Text
|
||||||
import Network.HTTP.Client.TLS (newTlsManager)
|
import Network.HTTP.Client.TLS (newTlsManager)
|
||||||
|
|||||||
@@ -39,7 +39,13 @@ drawMap settings colorPalette areas statistics =
|
|||||||
, ": "
|
, ": "
|
||||||
, Text.intercalate
|
, Text.intercalate
|
||||||
", "
|
", "
|
||||||
(map (\(surname, statistic) -> localize (showRounded count) <> " (" <> Text.toTitle surname <> ")") statistics)
|
( map
|
||||||
|
( \(surname, statistic) ->
|
||||||
|
let count = fromMaybe 0 (Map.lookup (key area) (getByArea statistic))
|
||||||
|
in localize (showRounded count) <> " (" <> Text.toTitle surname <> ")"
|
||||||
|
)
|
||||||
|
statistics
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -52,7 +58,6 @@ drawMap settings colorPalette areas statistics =
|
|||||||
then 0
|
then 0
|
||||||
else
|
else
|
||||||
count
|
count
|
||||||
/ fromIntegral (length statistics)
|
|
||||||
/ ( case scaleToMaximum settings of
|
/ ( case scaleToMaximum settings of
|
||||||
Global -> globalMaximum
|
Global -> globalMaximum
|
||||||
Local -> theMaximum
|
Local -> theMaximum
|
||||||
|
|||||||
Reference in New Issue
Block a user