healthyregions / chicago-environment-explorer

ChiVes harmonizes & standardizes environmental data across dozens of sources to make it accessible for full exploration, alongside a growing list of resources on the Chicago Environment, cultivated by a community of curators.
8 stars 1 forks source link

[Bug] Bin labels and color bars in legend don't match #151

Closed mradamcox closed 2 months ago

mradamcox commented 3 months ago

Describe the problem

I was trying a few things out to see if I could get a better alignment for the new min/max labels in the legend (not easy!), and then realized that with certain variables there are way more color bars than labels. For example:

image

As you can see (and this is the main site before the addition of min/max labels) there are only 5 labels where there should be 7 (if min/max were added here, then there would be 9 labels total).

This must be a discrepancy between the colorScale and bins variables that are passed into the Legend component.

Expected behavior

bins and colorScale should be dependent on each other upstream of the Legend such that the discrepancy noted here won't exist.

There should be one label per break-point that divides one bin from the next. Additionally, per #130, there should be a label for the minimum value and the maximum value (this work is in progress in https://github.com/GeoDaCenter/chicago-environment-explorer/pull/140)

bodom0015 commented 2 months ago

Fixed by #140 :+1: