Closed kennethbigler closed 2 years ago
This is fair but I am going to mark it as a feature request rather than a bug. When we originally designed the map, our intention was to make it so that any country with a value of 0 does not get color. Since I think this is a very valid request in my opinion, I would just mark it as a feature request rather than a bug. Thanks for the comment, I have been very busy and haven’t gotten a second to work on this. If my workload lightens next week I will take a look. Thanks for bearing with us. Yams
Hey, thanks for the response! I love to see an active developer community. I may try to contribute it if I have some time this week too, but don't wait up for me!
I couldn't get the build working locally but this is what I had in mind: https://github.com/yanivam/react-svg-worldmap/pull/127
This is actually a bug. Imagine if we have a map of GDP growth rates where there are both positive and negative values. Both positive and negative values would have colors, but only 0
would have no color. This is clearly not working as intended. Not all scales start at zero.
Describe the bug A clear and concise description of what the bug is.
The color prop does not activate with
value=0
. My guess is you are doing something like"if value, apply color"
but it should probably be more like"if value !== undefined, apply color"
.As a feature request, I would love it if you could also update value to be either
number | string
.To Reproduce Steps to reproduce the behavior:
pretty straightforward, give any country a value of 0 and the color will not display.
Expected behavior A clear and concise description of what you expected to happen.
pretty straightforward, give any country a value of 0 and the color should display. Give any country a value of
undefined
and the color should not display. If you want to get fancy, it probably makes sense to haveundefined | null
not display the color.