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

Choropleth Map Functionality #96

Open
adley-kim opened this issue Nov 14, 2022 · 0 comments
Open

Choropleth Map Functionality #96

adley-kim opened this issue Nov 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@adley-kim
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

The Map component currently supports a single fill color for all features.

Expected behavior

It would be nice if we could pass a property key as the fill value alongside colorScheme and emptyColor as props in order to render fill colors based on the designated property value of each feature.

image

Minimal reproduction of the problem with instructions

I wasn't able to come up with a complete test, but I think this feature can be implemented by adopting some of the logic in the HeatMap component.

The getValueScale() function used by HeatMapSeries would have to be adjusted to indicate which property to use as the value since geojson doesn't conform to the standard ChartDataShape.

The resulting valueScale() function could then be passed to the renderCountry() callback in order to apply individual fill colors to each path.

image

What is the motivation / use case for changing the behavior?

Mapping scaled fill values to individual paths would allow users to build choropleth maps, which offer more informative data viz than the current single-color basemaps.

@amcdnl amcdnl added the enhancement New feature or request label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants