Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Weird shape colors #289

Merged
merged 1 commit into from
Jan 26, 2022
Merged

fix: Weird shape colors #289

merged 1 commit into from
Jan 26, 2022

Conversation

bprusinowski
Copy link
Collaborator

Closes #281.

Previously, if no observation was mapped to a shape (or its measure value was equal to null), a null was used as a shape fill color. This led to weird bugs - changing this to a light gray color fixes the issue.

@bprusinowski bprusinowski requested a review from ptbrowne January 25, 2022 09:32
@ptbrowne ptbrowne temporarily deployed to visualize-ad-fix-weird--6m1aft January 25, 2022 09:32 Inactive
@bprusinowski bprusinowski changed the title fix: Weird shapes colors fix: Weird shape colors Jan 25, 2022
Copy link
Collaborator

@ptbrowne ptbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it means that if there a lot of observations with null measures, we will have a lot of gray shapes on the map ? Why do we draw the shape at all ? Couldn't we just not draw the shape ?

@bprusinowski
Copy link
Collaborator Author

Yes, I think it's a common approach to show shapes with no data as "greyed out" - let's say that somebody configured a map with no relief, and that all cantons are visible at first. But there are also interactive filters enabled and after doing some filtering only one canton has some data, then it would be alone on the map without any context. I just thought that it makes sense, do you think it should be done differently?

@ptbrowne
Copy link
Collaborator

I see, I had not the interactive filter with no data in mind. Shouldn't it be managed by the base layer then ?

@AnninaWalker
Copy link
Contributor

We have also forseen to add a legend for either "No value" or "No data" in the Design Mockup. In the Covid Dashboard it is dealt with it in exactly the same way.
Uploading Screenshot 2022-01-25 at 15.18.05.png…

@ptbrowne
Copy link
Collaborator

ptbrowne commented Jan 25, 2022

We have also forseen to add a legend for either "No value" or "No data" in the Design Mockup.

👍

But there are also interactive filters enabled and after doing some filtering only one canton has some data

If you filter out some cantons, is it not because you do not want to see them on the map ? Anyway, I think it's good that we have no problems for the moment, the fix is good to me ;) LGTM

@AnninaWalker
Copy link
Contributor

Screenshot 2022-01-25 at 15 18 05

@bprusinowski
Copy link
Collaborator Author

If you filter out some cantons, is it not because you do not want to see them on the map ?

Generally yes, but I think that we aren't able to filter by geo dimensions in interactive filters, so this should only happen when we filter by some other filter and encounter missing data there :)

I will have to check the logic on including dimensions in interactive filters, but this is the case for current testing datasets.

@ptbrowne
Copy link
Collaborator

I see, thanks for the explanations 💯

@bprusinowski
Copy link
Collaborator Author

@ptbrowne if you think everything looks good, you can approve so the bug shouldn't happen anymore (maybe BAFU has already started testing the maps). I'm going to handle "no data" on legend in a different PR :)

@ptbrowne ptbrowne self-requested a review January 26, 2022 17:30
@bprusinowski bprusinowski merged commit 56604d4 into main Jan 26, 2022
@bprusinowski bprusinowski deleted the fix/weird-shapes-colors branch January 26, 2022 17:30
@ptbrowne
Copy link
Collaborator

Oups sorry I had forgotten to review again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maps: Weird Drawing of shapes
3 participants