onomastics-ng: fix color palette
This commit is contained in:
@@ -38,7 +38,7 @@ main = do
|
|||||||
case mode options of
|
case mode options of
|
||||||
Relative -> relativeCount
|
Relative -> relativeCount
|
||||||
Absolute -> absoluteCount
|
Absolute -> absoluteCount
|
||||||
colors = if null $ colorPalette options then defaultColorPalette else colorPalette options
|
colors = colorPalette options ++ defaultColorPalette
|
||||||
svgSettings = SvgSettings{scaleToMaximum = Global}
|
svgSettings = SvgSettings{scaleToMaximum = Global}
|
||||||
res <- runStoepel manager' $ do
|
res <- runStoepel manager' $ do
|
||||||
let theNames = map Just (surnames options)
|
let theNames = map Just (surnames options)
|
||||||
|
|||||||
@@ -88,9 +88,7 @@ app manager' (theDistricts, theStates) = serve onomapApi server
|
|||||||
let stats = map (computeAreaStatistics computeFunction theAreas) theStats
|
let stats = map (computeAreaStatistics computeFunction theAreas) theStats
|
||||||
return
|
return
|
||||||
Response
|
Response
|
||||||
{ color = case colors of
|
{ color = colors ++ defaultColorPalette
|
||||||
[] -> defaultColorPalette
|
|
||||||
x -> x
|
|
||||||
, areas = theAreas
|
, areas = theAreas
|
||||||
, statistics = zip surnames stats
|
, statistics = zip surnames stats
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user