onomastics-ng: fix color palette

This commit is contained in:
2022-10-07 02:40:01 +02:00
parent b830ea7f98
commit 23ff9fd7e6
2 changed files with 2 additions and 4 deletions

View File

@@ -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)

View File

@@ -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
}