Annotations: what the reader is supposed to notice

Data on a map says what is where. An annotation says why you published it, and that is usually the actual point. Three anchoring modes, because there are three things authors point at: a coordinate, a feature by key, or an area. Pan and zoom: the anchors track the geography while the text keeps its size, and the chips stay out of the way of the pointer, so the countries underneath keep their own tooltips.

Annotations win, labels yield

Turn the feature labels on and watch the count in the status line. The labels that would have collided with an annotation are dropped, never the other way round: you placed the annotation deliberately and the label came from a rule, so the rule gives way. Almost every charting library resolves this backwards, silently losing the annotation that arrived second.

{
  annotations: {
    points: [{
      at: [-77.04, -12.05],
      label: 'Deepest point of the Humboldt current',
      marker: { shape: 'pin', size: 12 },
      connector: true,
    }],
    features: [{ key: 'IND', label: 'India', outline: true }],
    areas: [{
      bounds: [-20, 10, 40, 30],   // [west, south, east, north]
      label: 'The Sahel',
      fillOpacity: 0.14,
    }],
  },
}