azavea/green-equity-demo

Should unselected categories disappear from the tooltip?

jacobtylerwalls opened this issue · 2 comments

Overview

Tennessee has a huge climate spend causing its per capita amount to be > $4k. Yet when you toggle to transportation, we change the per capita markers on the map to the smallest figure, but continue to show the $4k per capita figure in the tooltip, as well as all categories of spending.

Screenshot 2023-03-03 at 5 00 26 PM

Expected Behavior

Should we change the per capita figures in the tooltip to track the selected category? If so, is there a clarification we should make in the copy? Or should we remove the bar percentages for the other categories so that it's self-evident?

Great question! The bar percentages per category in the tooltip make sense when you have the 'all categories' selected. Once you've selected a specific category like 'transportation', I think the content in the tooltip should have information just about that category, like the dollar per capita for transportation in that state so far and total amount of awarded funding for that category. Percentages don't add much in that case, you can leave that part out.

Probably good to add some copy in that case, for example: 'Dollars per capita for transportation: $4,000'