You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is it possible to modify the legend for a density map? For example, if I select colors White, Red, steps 5, and have a feature value between 0 to 100,000, the map and legend is created with 0 as White and 100,000 as red. But, I rather want it to categorize based on ranges of values. For example. <20,000, 20,000-70,000, >100,000. How is it possible to modify the legend this way?
The text was updated successfully, but these errors were encountered:
Hi! Unless I'm misunderstanding, this should happen automatically, via the steps argument. Would you paste a code sample to illustrate what you mean? (Either here or via codepen.com)
It doesn't exactly match your image, but it's closer. Do you know the algorithm used to generate the buckets/breaks in the image? The default in leaflet-choropleth is quantile (q), but there's also equidistant, logarithmic, and k-means (see chroma docs). Just swap the 'q' in mode when you initialise your choropleth. Between that and the step count, it should hopefully get you there. Also note that the darkest value in that image is not orange but something more like #8b3e38.
Hi, is it possible to modify the legend for a density map? For example, if I select colors White, Red, steps 5, and have a feature value between 0 to 100,000, the map and legend is created with 0 as White and 100,000 as red. But, I rather want it to categorize based on ranges of values. For example. <20,000, 20,000-70,000, >100,000. How is it possible to modify the legend this way?
The text was updated successfully, but these errors were encountered: