Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Implement map tooltip #420

Closed
noahmanger opened this issue Aug 4, 2015 · 7 comments
Closed

Implement map tooltip #420

noahmanger opened this issue Aug 4, 2015 · 7 comments

Comments

@noahmanger
Copy link
Contributor

When hovering over a state on a map, show the value associated with that state in a tooltip.

This needs design, but that should probably be done as part of the overall visual component work. In the mean time, a basic tooltip can be implemented that can be styled later.

@noahmanger
Copy link
Contributor Author

There are two needs here:

  1. Map states need a hover state to show users that they're clickable.
  2. If you're looking at a map that does not have a table next to it, states should have a tooltip when you click on them. If the map is next to a table (like on the committee receipts tab), clicking on a state highlights the row.

Is this the right behavior? Or should we have the tooltip on both?

Tasks to completion:

@jenniferthibault
Copy link
Contributor

Thank you @noahmanger for an excellently organized issue!

@onezerojeremy
Copy link

the former! No tooltip on map-state-click when the data table lives next to it, but otherwise, yes, love it.

@noahmanger
Copy link
Contributor Author

👍

jmcarp added a commit to jmcarp/openFEC-web-app that referenced this issue Aug 24, 2015
* Add unstyled tooltip for election state maps
* Bring hovered state to front

Part of fecgov#420
@jenniferthibault
Copy link
Contributor

@jmcarp @noahmanger here's what I'm thinking for styling:

The default state borders would all be 1pt Federal Blue (#022C53)
When a state is hovered, the outline changes to 4pt or 5pt Federal Blue (or large enough so that when you hover you can clearly distinguish a different weight without changing the color) California and North Carolina are hovered in the below example, though obviously you could only do one at a time. Just trying to cut down on screenshots.

The tooltip could look like this:
If the Aqua is too much, we could also make the headers Ivory

screen shot 2015-08-27 at 7 24 21 pm

@jenniferthibault
Copy link
Contributor

Also a more subtle option with solid #FFFFF9 as a background.
I think I like this one better:

screen shot 2015-08-27 at 7 36 03 pm

@noahmanger
Copy link
Contributor Author

Remaining task on this is to reposition the tooltip. Re-assigning this to Josh for that.

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

No branches or pull requests

5 participants