Type Alias: ScattergeoTrace
ts
type ScattergeoTrace = Omit<CommonTraceAttributes, 'hoverinfo'> & object;Markers, great-circle lines, text and filled areas at longitudes and latitudes on a map-projection subplot (layout.geo).
Type Declaration
| Name | Type | Description |
|---|---|---|
connectgaps? | boolean | Connect lines across missing (null, NaN) points instead of breaking them. |
featureidkey? | string | The key of the geojson features that locations are matched against, e.g. 'properties.name'. Only with geojson. |
fill? | "none" | "toself" | toself closes the line (each run between gaps) into a shape on the sphere, filled with fillcolor. Of the two regions a closed path bounds, the smaller one is filled. |
fillcolor? | string | Fill color. Default: the line color (else the marker color, else the colorway color) at half opacity. |
geo? | "geo" | `geo${number}` | The geo subplot this trace is drawn on: 'geo' (layout.geo), 'geo2' (layout.geo2), …. |
geojson? | unknown | GeoJSON whose features locations refers to: a FeatureCollection or Feature with Polygon or MultiPolygon geometries, or a URL of one. Without it, locations are matched to the features of the base map. |
hoverinfo? | PerPoint< | "lon" | "lat" | "location" | "text" | "name" | `${"lon" | "lat" | "location" | "text" | "name"}+${string}` | "all" | "none" | "skip"> | Which fields hover labels show (the coordinates as (lat°, lon°), the location, the text and the trace name); 'skip' also turns hover events off for this trace. Default 'all'. |
lat? | DataColumn | Latitudes, in degrees North. |
line? | ScattergeoTraceLine | Line style (mode lines). Each segment follows the great circle between its points. |
locationmode? | "ISO-3" | "USA-states" | "country names" | "geojson-id" | What the entries of locations name: 'ISO-3' country codes, 'USA-states' (two-letter codes or state names), 'country names' (names, or ISO codes), or 'geojson-id' for the features of geojson. Default 'geojson-id' when geojson is given. |
locations? | DataColumn | Location ids or names, drawn at the centroid of each location (see locationmode), instead of lon and lat. A location that matches nothing is skipped, and one warning names the unmatched ones. |
lon? | DataColumn | Longitudes, in degrees East. |
marker? | ScattergeoTraceMarker | Marker style (mode markers). |
mode? | | "lines" | "markers" | "text" | "lines+markers" | "lines+text" | "markers+lines" | "markers+text" | "text+lines" | "text+markers" | "lines+markers+text" | "lines+text+markers" | "markers+lines+text" | "markers+text+lines" | "text+lines+markers" | "text+markers+lines" | "none" | Drawing mode: markers, lines along great circles, text labels, or several. |
selected? | ScatterTraceSelected | Style of selected points while a selection is active (box/lasso select, selectedpoints). |
text? | PerPoint<string | number> | Text per point: the labels of mode text, and hover text (unless hovertext is set). |
textfont? | ScatterTraceTextfont | Font of the text labels (mode text). Defaults to layout.font. |
textposition? | PerPoint< | "top left" | "top center" | "top right" | "middle left" | "middle center" | "middle right" | "bottom left" | "bottom center" | "bottom right"> | Where text labels sit relative to their point (and marker), or one per point. |
texttemplate? | PerPoint<string | number> | Template for the text labels, e.g. '%{text} (%{lat:.1f}°)' (d3-format after :). Keys: lon, lat, location, text, customdata, marker.size, marker.color, meta. Overrides text. |
type | "scattergeo" | Trace type. |
unselected? | ScatterTraceUnselected | Style of unselected points while a selection is active (box/lasso select, selectedpoints). |