My D3 Choropleth map is only passing 5 tests even though it “works”.
The tests it is failing are:
4. There should be at least 4 different fill colors used for the counties.
I tested this and found there to be 263 unique fill colors
5. My counties should each have “data-fips” and “data-education” properties containing their corresponding fips and education values.
I inspected many (but not all) county elements and they all have the data-fips and data-education properties corresponding to their county.
6. My Choropleth should have a county for each provided data point.
I’m pretty sure this works considering I’m not getting any errors and counties appear to have generated properly.
7. The counties should have data-fips and data-education values that match the sample data
9. There should be at least 4 different fill colors used for the legend.
I’m using a linear gradient with 6 stops so there are definitely 4 different colors used.
It also fails the 2 tooltip tests. Functionally it works, when I mouseover a county it shows all of the relevant information.
- I can mouse over an area and see a tooltip with a corresponding id=“tooltip” which displays more information about the area.
- My tooltip should have a “data-education” property that corresponds to the “data-education” of the active area.