Population explorer

Switch the grouping; the same marks fly to their new clusters.

Why it matters 'flow' transition: the crowd migrates and recolours between groupings with spring motion; reduced-motion places instantly

Chart type
Unit unit
Tier
Free Core
Collection
Unit & pictogram
Render
Live, site theme
View .md Agent setup
LIVE/unit/population-explorer4 of 33 in Unit

Configuration

Raw Standalone
const options = {
  chart: {
    height: 400,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "unit",
    toolbar: {
      show: false
    }
  },
  series: [64, 118, 92, 46],
  labels: ["0-17", "18-39", "40-64", "65+"],
  plotOptions: {
    unit: {
      transition: "flow",
      gather: {
        motion: "spring",
        spring: "gentle"
      },
      clusterLabels: {
        show: true
      }
    }
  },
  title: {
    text: "A city of 320 residents"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()