From 23ff9fd7e6ec658448d6a6b314d1e5510f3c58f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 7 Oct 2022 02:40:01 +0200 Subject: [PATCH] onomastics-ng: fix color palette --- onomastics-ng/cli/Main.hs | 2 +- onomastics-ng/web/Main.hs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/onomastics-ng/cli/Main.hs b/onomastics-ng/cli/Main.hs index b8576dc..5d40ec1 100644 --- a/onomastics-ng/cli/Main.hs +++ b/onomastics-ng/cli/Main.hs @@ -38,7 +38,7 @@ main = do case mode options of Relative -> relativeCount Absolute -> absoluteCount - colors = if null $ colorPalette options then defaultColorPalette else colorPalette options + colors = colorPalette options ++ defaultColorPalette svgSettings = SvgSettings{scaleToMaximum = Global} res <- runStoepel manager' $ do let theNames = map Just (surnames options) diff --git a/onomastics-ng/web/Main.hs b/onomastics-ng/web/Main.hs index 8dd7f6c..97d3ca6 100644 --- a/onomastics-ng/web/Main.hs +++ b/onomastics-ng/web/Main.hs @@ -88,9 +88,7 @@ app manager' (theDistricts, theStates) = serve onomapApi server let stats = map (computeAreaStatistics computeFunction theAreas) theStats return Response - { color = case colors of - [] -> defaultColorPalette - x -> x + { color = colors ++ defaultColorPalette , areas = theAreas , statistics = zip surnames stats }