Tile map chart reference

Tile map examples

Contents: Use cases, Chart IDs, Minimal spec, Data, Options, Annotations, Sizing, Fixtures.

Equal-size region tiles with explicit scale, no-data trace, and solver-placed abbreviation tiers. Type tilemap.

Use cases

Chart IDs

One form; its chart ID is tilemap.

Minimal spec

{
  "type": "tilemap",
  "data": {
    "pack": "eu27",
    "regions": [{ "id": "DE", "value": 2.3 }, { "id": "FR", "value": 1.6 }, { "id": "IT", "value": 1.1 }]
  },
  "options": {
    "title": "Germany has the highest inflation rate among the three supplied countries",
    "unit": "%",
    "classes": 3,
    "source": "Illustrative data"
  }
}

Data

PathTypeRequiredMeaning
packstringyesBuilt-in equal-area tile layout. Unknown data region ids are left out with a warning and a note; all-unknown data is refused. One of 'eu27', 'europe', 'world', 'us-states'.
regionsarrayyesObserved regions keyed by pack id; omitted pack members are not in the data and draw plain background. Zero regions is empty-data.
regions[].idstringyesRegion identifier from the selected geographic pack. Exact spellings win, then ids and aliases match without regard to case. Unknown data ids are left out with a warning and a note; all-unknown data is refused.
regions[].valuenumber | nullyesRegion measure; null without a state means missing data.
regions[].statestringNamed null state: suppressed, not meaningful (nm), or not applicable (na). Each has a distinct pattern and key. Requires value null. One of 'na', 'nm', 'suppressed'.
overlaysarrayNamed glyphs and labels placed at geographic anchors.
overlays[].idstringyesStable overlay identifier, unique within the exhibit.
overlays[].atobjectyesRegion or longitude/latitude anchor for the overlay.
overlays[].at.region (overlays[].at branch 1)stringyesRegion id whose pack anchor positions the overlay. Exact spellings win, then ids and aliases match without regard to case.
overlays[].at.lon (overlays[].at branch 2)numberyesLongitude in degrees, west negative and east positive.
overlays[].at.lat (overlays[].at branch 2)numberyesLatitude in degrees, south negative and north positive.
overlays[].glyphobjectyesOverlay mark and its semantic data.
overlays[].glyph.kind (overlays[].glyph branch 1)stringyesDraw a small part-to-whole pie. One of 'pie'.
overlays[].glyph.shares (overlays[].glyph branch 1)arrayyesAt least two labeled shares with a positive combined amount.
overlays[].glyph.shares[].label (overlays[].glyph branch 1)stringyesReadable name for this overlay or pie share.
overlays[].glyph.shares[].value (overlays[].glyph branch 1)numberyesNonnegative share amount; slices divide by the positive sum of all shares.
overlays[].glyph.shares[].tone (overlays[].glyph branch 1)stringSemantic glyph tone resolved through the theme. One of 'good', 'bad', 'warn', 'neutral', 'info'.
overlays[].glyph.kind (overlays[].glyph branch 2)stringyesDraw a fractionally filled Harvey ball. One of 'harvey'.
overlays[].glyph.value (overlays[].glyph branch 2)numberyesFilled fraction from 0, empty, to 1, full.
overlays[].glyph.tone (overlays[].glyph branch 2 | overlays[].glyph branch 4 | overlays[].glyph branch 5)stringSemantic glyph tone resolved through the theme. One of 'good', 'bad', 'warn', 'neutral', 'info'.
overlays[].glyph.kind (overlays[].glyph branch 3)stringyesDraw a semantic status glyph. One of 'status'.
overlays[].glyph.status (overlays[].glyph branch 3)stringyesStatus judgment shown by the glyph. One of 'good', 'bad', 'warn', 'neutral'.
overlays[].glyph.kind (overlays[].glyph branch 4)stringyesDraw a named built-in icon. One of 'icon'.
overlays[].glyph.name (overlays[].glyph branch 4)stringyesName from the built-in icon catalog: alert calendar check conversation document flag gear lightbulb lock people star target workflow.
overlays[].glyph.kind (overlays[].glyph branch 5)stringyesDraw a geometric location marker. One of 'marker'.
overlays[].glyph.shape (overlays[].glyph branch 5)stringMarker outline; defaults to circle. One of 'circle', 'square', 'diamond'.
overlays[].labelstringyesReadable name for this overlay or pie share.
overlays[].sizestringGlyph size tier; defaults to md. One of 'sm', 'md', 'lg'.
overlays[].a11ystringAuthored accessible description for the overlay.

Options

PathTypeValuesDefaultMeaning
scaleobject{"kind":"sequential"}Sequential magnitude or diverging midpoint color scale.
scale.kind (scale branch 1)string'sequential''sequential'Encode ordered magnitudes with one color ramp.
scale.kind (scale branch 2)string'diverging''sequential'Encode values on favorable and unfavorable sides of a midpoint, on one span both ways: the farther side sets full strength.
scale.midpoint (scale branch 2)numberNeutral dividing value in the same source units as region values.
scale.polarity (scale branch 2)string'higherIsBetter', 'lowerIsBetter'Which side of the midpoint is favorable; the diverging poles paint good/bad accordingly. Default higherIsBetter.
classesintegerNumber of equal-interval color classes, from 3 through 7. Explicit steps define five classes instead.
stepsarrayFour ascending thresholds in source units, as on cohort, defining five color classes. A value on a threshold enters the higher class. The first and last classes are open-ended. Omit to keep the continuous ramp or equal-interval classes. Use a format that prints each threshold exactly.
overlayTonesobjectThe key words for each overlay tone, e.g. { warn: 'Behind plan' }. The overlay key shows a toned glyph among plain ones, each status and each pie share; beside keyed tones, plain Harvey balls take the overlayMeasure entry and other plain glyphs share one 'Other' entry. A toned entry without a name prints the tone word and warns.
overlayTones.goodstringWhat the good tone marks on this map.
overlayTones.badstringWhat the bad tone marks on this map.
overlayTones.warnstringWhat the warn tone marks on this map.
overlayTones.neutralstringWhat the neutral tone marks on this map.
overlayTones.infostringWhat the info tone marks on this map.
overlayMeasurestringThe measure the overlay glyphs show, e.g. 'Activation progress, %'. The overlay key prints it as a heading without a category swatch, apart from the color key; Harvey-ball overlays without it warn geo-overlay-measure-unnamed.
regionValuesbooleanPrint each tile's value under its code, e.g. 'CA' over '52'. Unset prints the values when every value fits its tile and keeps the codes alone when one does not. true prints them where they fit: a tile too small for both keeps its code and the layout warns that its value shows on hover only. false prints codes only.

Plus the shared options. This type does not accept detailFields, labelPosition, valueAxis, highlight, story, rounding, annotations. This type ignores animate, debug, rowLabels, categoryAxis, categoryLabels, secondaryAxis, sort, topN, bandFraction, valueAxis.show, valueAxis.gridlines with an option-ignored warning.

Annotations

This type takes no annotations.

Sizing

Floor 320 × 270 px; fit content.

Below the floor a render is refused with size-below-floor and the pixels it needs. measure returns the natural and comfortable size for a given spec; see Sizing in the manual.

Fixtures

IDKindUse case
eu27-equal-tilesexampleEU-27 tile grid: equal visual weight for every member
us-state-tile-gridexampleUS states + DC: equal-area alternative with explicit no-data trace
world-tile-grid-densetortureTorture: every world-pack member remains an equal tile with an abbreviation
eu27-demand-versus-planexampleDemand above plan is favorable
eu27-cost-versus-planexampleCost below plan is favorable
eu27-demand-colorblindexampleDemand versus plan in the colorblind-safe good/bad pair
tile-key-rightexampleThe value key in a column right of the tiles
us-state-tile-grid-wide-slotexampleUS states on a wide slot: the value key stands beside the tiles
tile-key-bottomexampleThe value key in one row below the tiles
us-states-overlay-tonesexampleFive state overlays in every tone, the tones and the ball measure named in the overlay key
us-states-overlay-glyphstortureStatus, pie, icon and marker overlays in every tone, shape and size
outlier-steps-and-missing-valuesexampleExplicit thresholds keep ordinary values distinct from an outlier
named-null-statestortureNamed map states differ from missing values
europe-tile-gridexampleEurope tile grid: every member of the europe pack as an equal tile