Skip to content

Variable: choropleth ​

ts
const choropleth: ExpressFunction<ChoroplethOptions>;

Experimental

A choropleth map (px.choropleth): the regions locations name, colored by color — a numeric column through a colorscale on coloraxis (one choropleth trace), any other column with one color and legend item per value (one trace each).

Example ​

ts
const figure = choropleth(countries, {
  locations: 'iso',
  color: 'lifeExp',
  hoverName: 'country',
  colorContinuousScale: 'Viridis',
});

Released under the MIT License.