Page MenuHomePhabricator

Map layer colors are poorly chosen, especially for very few layers
Closed, ResolvedPublic

Description

If you only have two layers, the first layer is colored blue, and the second layer is colored light blue, because that’s the first two colors in d3.scale.category20(). That’s a pretty bad choice – the layers are hard to distinguish because they’re the just the same hue with a different lightness/saturation, and light blue is also hard to see against white landmasses (once you’re zoomed out far enough that streets etc. are no longer visible), and almost invisible against the ocean, which is also light blue.

I’m not sure what the best solution to this is; perhaps using d3.scale.category10() if there’s ≤ 10 layers?

Event Timeline

Restricted Application added a project: Discovery. · View Herald TranscriptOct 13 2016, 11:06 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
hoo added a subscriber: Jonas.Oct 13 2016, 11:07 AM

Yes, I am OK with the proposed solution.
@WikidataFacts feel free to submit a patch!
You might also want to fix this T144735: ?layerLabel instead of ?layer for Wikidata Query Service map view

We could also allow color column like in bubble chart.

Let's please start by making the default actually work for people before we invest time in configurability.

Change 319537 had a related patch set uploaded (by Jonas Kress (WMDE)):
Fix: Map layer colors are poorly chosen, especially for very few layers

https://gerrit.wikimedia.org/r/319537

Change 319537 merged by jenkins-bot:
Fix: Map layer colors are poorly chosen, especially for very few layers

https://gerrit.wikimedia.org/r/319537

Jonas closed this task as Resolved.Nov 3 2016, 8:02 PM
Jonas moved this task from Proposed to Done on the Wikidata-Sprint-2016-10-12 board.