Black Lives Matter. Please consider donating to Black Girls Code today.

Choropleth custom regions and mapbox

Hi,

I have a set of custom regions and the corresponding json as you present on the example on https://plot.ly/javascript/choropleth-maps/#choropleth-map-of-florida-counties-colored-by-political-party

Instead of setting the colors, in your example, two layers, each with one color; I would like the Choropleth, that is, shade the geographic regions by value.

I wonder how could I achieve that. Is there a way to set a value to the “redjson” object and have a color scale do the coloring?

I did a simplified version here https://codepen.io/ajoposor/pen/PEQaMN?editors=1010 to which I would like to have the color of the regions be set by set by some given z values.

Many thanks,

Antonio

Not at the moment. We don’t support colorscales in mapbox layers.