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

Score values sometimes difficult to read in data-viz tooltips #40

Open
robyngit opened this issue Jun 23, 2021 · 0 comments
Open

Score values sometimes difficult to read in data-viz tooltips #40

robyngit opened this issue Jun 23, 2021 · 0 comments
Assignees
Labels
bug Something isn't working data viz Related to any of the D3 data visualization elements priority: low region rank chart Related to the bar chart that shows a region's score relative to all other regions scores globe Related to the global scores map that is shown on the global scores page

Comments

@robyngit
Copy link
Member

Tooltips are used to show the scores for a given region in both the rank bar chart (on the region scores page) and the scores globe (on the global scores page). The score value is shown against a background that has the corresponding colour for the score:

tooltip with score on yellow background

When these score colours are dark, the score is difficult to read:

tooltip with score on red background

The text with the score value should switch between light/dark text dynamically, depending on the background colour. See for example "How to decide font color in white or black depending on background color?" and "Dynamically changing the text color based on background color contrast with vanilla JS"

@robyngit robyngit added bug Something isn't working data viz Related to any of the D3 data visualization elements scores globe Related to the global scores map that is shown on the global scores page labels Jun 23, 2021
@robyngit robyngit self-assigned this Jun 23, 2021
@robyngit robyngit added the region rank chart Related to the bar chart that shows a region's score relative to all other regions label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data viz Related to any of the D3 data visualization elements priority: low region rank chart Related to the bar chart that shows a region's score relative to all other regions scores globe Related to the global scores map that is shown on the global scores page
Projects
None yet
Development

No branches or pull requests

2 participants