Map Choropleth

Color Scale Options

Color Scale

Type: colorscale

Documentation: Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, [[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, use zmin and zmax. Alternatively, colorscale may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.

Path: data.index.colorscale

Reverse Scale

Default Value: false

Type: boolean

Documentation: Reverses the color mapping if true. If true, zmin will correspond to the last color in the array and zmax will correspond to the first color.

Path: data.index.reversescale

Show Scale

Default Value: true

Type: boolean

Documentation: Determines whether or not a colorbar is displayed for this trace.

Path: data.index.showscale

Z Auto

Default Value: true

Type: boolean

Documentation: Determines whether or not the color domain is computed with respect to the input data (here in z) or the bounds set in zmin and zmax Defaults to false when zmin and zmax are set by the user.

Path: data.index.zauto

Z Max

Type: number

Documentation: Sets the upper bound of the color domain. Value should have the same units as in z and if set, zmin must be set as well.

Path: data.index.zmax

Z Mid

Type: number

Documentation: Sets the mid-point of the color domain by scaling zmin and/or zmax to be equidistant to this point. Value should have the same units as in z. Has no effect when zauto is false.

Path: data.index.zmid

Z Min

Type: number

Documentation: Sets the lower bound of the color domain. Value should have the same units as in z and if set, zmax must be set as well.

Path: data.index.zmin


Geo JSON Options

Feature Id Key

Default Value: id

Type: string

Documentation: Sets the key in GeoJSON features which is used as id to match the items included in the locations array. Only has an effect when geojson is set. Support nested property, for example properties.name.

Path: data.index.featureidkey

Geo Json

Type: any

Documentation: Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type FeatureCollection or Feature with geometries of type Polygon or MultiPolygon.

Path: data.index.geojson


Hover Formatting

Hover Info

Default Value: all

Type: flaglist

Accept List: true

Flag Options: location,z,text,name

Flag Single: all,none,skip

Documentation: Determines which trace information appear on hover. If none or skip are set, no information is displayed upon hovering. But, if none is set, click and hover events are still fired.

Path: data.index.hoverinfo

Hover Template

Default Value:

Type: string

Accept List: true

Documentation: Template string used for rendering the information that appear on hover box. Note that this will override hoverinfo. Variables are inserted using %{variable}, for example "y: %{y}" as well as %{xother}, {%xother}, {%xother}, {%xother}. When showing info for several points, xother will be added to those with different x positions from the first point. An underscore before or after (x|y)other will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in hovertemplate are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are arrayOk: true) are available. Anything contained in tag <extra> is displayed in the secondary box, for example "{fullData.name}". To hide the secondary box completely, use an empty tag <extra></extra>.

Path: data.index.hovertemplate


Data Source

Location Mode

Default Value: ISO-3

Type: enumerated

Enum Options: ISO-3,USA-states,country names,geojson-id

Documentation: Determines the set of locations used to match entries in locations to regions on the map. Values ISO-3, USA-states, country names correspond to features on the base map and value geojson-id corresponds to features from a custom GeoJSON linked to the geojson attribute.

Path: data.index.locationmode

Locations

Type: any

Accept List: true

Documentation: Sets the coordinates via location IDs or names. See locationmode for more info.

Path: data.index.locations

Text

Default Value:

Type: string

Accept List: true

Documentation: Sets the text elements associated with each location.

Path: data.index.text

Z

Type: any

Accept List: true

Documentation: Sets the color values.

Path: data.index.z


Items Styling

Line Color

Default Value: #444

Type: color

Accept List: true

Documentation: Sets the marker.line color. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to marker.line.cmin and marker.line.cmax if set.

Path: data.index.marker.line.color

Line Width

Default Value: 1

Type: number

Accept List: true

Min: 0

Documentation: Sets the width (in px) of the lines bounding the marker points.

Path: data.index.marker.line.width

Opacity

Default Value: 1

Type: number

Accept List: true

Min: 0

Max: 1

Documentation: Sets the opacity of the locations.

Path: data.index.marker.opacity


Basic Options

Name

Type: string

Documentation: Sets the trace name. The trace name appears as the legend item and on hover.

Path: data.index.name

Last updated