visualize-admin / visualization-tool

The tool for visualizing Swiss Open Government Data. Project ownership: Federal Office for the Environment FOEN
https://visualize.admin.ch
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

feat: Map chart improvements #1435

Closed bprusinowski closed 5 months ago

bprusinowski commented 5 months ago

Closes #1425

This PR:

How to test

PR

  1. Go to this link.
  2. Switch to a map chart.
  3. Remove Areas (change dimension to None).
  4. Add Symbols (change dimension to Kanton).
  5. ✅ See that the map is shown.
  6. ✅ See that each symbol is encircled with a black border.
  7. Change color measure to Leistung in kW.
  8. ✅ See that it's possible to control the opacity with a slider.
  9. Change color measure to Kanton.
  10. ✅ See that it's possible to control the opacity with a slider.
  11. ✅ See that circles in the legend have a size that matches the height of the text.

TEST

  1. Go to this link.
  2. Switch to a map chart.
  3. Remove Areas (change dimension to None).
  4. Add Symbols (change dimension to Kanton).
  5. ❌ See that the map is not shown.
  6. Add the Areas back.
  7. Switch to Symbols options.
  8. ❌ See that symbols are not encircled with black borders.
  9. Change color measure to Leistung in kW.
  10. ❌ See that it's not possible to control the opacity.
  11. Change color measure to Kanton.
  12. ❌ See that it's not possible to control the opacity.
  13. ❌ See that circles in the legend have a size that is smaller than the height of the text.
vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 2:53pm
bprusinowski commented 5 months ago

@KerstinFaye as it was rather easy to implement both behaviors mentioned in #1425 (symbol opacity and border), I decided to give them a go – you can test them by following the instructions in the How to test section in the PR description, let me know if it's fine to leave things like this, or if we should introduce some changes 🎨

KerstinFaye commented 5 months ago

Thanks @bprusinowski, the changes look good. I realized that when I changed the opacity the map is zooming in. I zoomed out to be able to see the overlap of the dots. Is there a reason for this? Otherwise it looks great.

bprusinowski commented 5 months ago

Thanks for reviewing @KerstinFaye 🎉 As discussed offline, we will keep the black border; I'll also investigate the zooming in when changing chart options 👍