Skip to content
Elements / Data

map

binds state

Canvas map with pin markers, data-driven country choropleths and proportional bubble maps. For data maps, give items plus geographic and numeric field names; Canvas handles colors, sizing and legends.

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground
Tweak the props
kind
legend
fit
cluster
interactive
controls
route

Props

kindmarkers · choropleth · bubblemarkers uses pin children; choropleth colors countries from dataset rows; bubble plots sized locations from dataset rows.markers
itemsexpressionData rows for kind=choropleth or kind=bubble, e.g. items=sales. Do not embed individual rows in map specs.—
regionnameCountry-name column for choropleth, e.g. region=country.—
valuenameNumeric column used for country shading or proportional bubble area.—
latnameLatitude column for bubble maps.—
lonnameLongitude column for bubble maps.—
labelnameLocation-name column for bubble maps.—
legendbooleanShow a Canvas legend; defaults on for choropleth and bubble, off for markers.—
legendTitlestringLegend title, e.g. Revenue ($) or Project value.—
highlightstringComma-separated country names to tint, e.g. Japan,Brazil.—
bindstateState name that receives the clicked country or marker label.—
fitworld · pinsInitial framing: whole world, or zoom to the current pin locations. Re-fits when the pins change.world
clusterbooleanGroup nearby pins into clickable counts. Zooming in separates them.false
interactivebooleanEnable mouse-wheel zoom and drag pan.true
controlsbooleanShow Canvas zoom in, zoom out and reset controls. Opt in to preserve the original minimal map appearance.false
routebooleanJoin the pins with a line in the order they are written, for a trip or a delivery run.false
ifconditionShow only when this expression is true, e.g. if=done or if={count>0}. Every element takes it.—
tipstringA short explanation shown on hover, keyboard focus or a tap, e.g. tip="Orders not yet shipped": for a term or a number some people won't know, instead of more words on screen. It makes the element a Tab stop if it isn't one. Every element takes it.—

Children: pin

SayShape v0.1 is an early prototype under the MIT License. Status · GitHub