chartlet 0.22.0

Compile structured data into deterministic, accessible static charts
Documentation
{
  "schemaVersion": 1,
  "type": "sankey",
  "title": "Voter movement",
  "width": 760,
  "height": 460,
  "sankey": {
    "order": "listed",
    "nodes": [
      {
        "label": "Red 2021",
        "column": 0,
        "color": 2
      },
      {
        "label": "Green 2021",
        "column": 0,
        "color": 3
      },
      {
        "label": "Blue 2021",
        "column": 0,
        "color": 1
      },
      {
        "label": "Red 2025",
        "column": 1,
        "color": 2
      },
      {
        "label": "Green 2025",
        "column": 1,
        "color": 3
      },
      {
        "label": "Blue 2025",
        "column": 1,
        "color": 1
      },
      {
        "label": "Did not vote",
        "column": 1,
        "color": 4
      }
    ],
    "links": [
      {
        "from": "Red 2021",
        "to": "Red 2025",
        "value": 40
      },
      {
        "from": "Red 2021",
        "to": "Green 2025",
        "value": 10
      },
      {
        "from": "Red 2021",
        "to": "Did not vote",
        "value": 5
      },
      {
        "from": "Green 2021",
        "to": "Green 2025",
        "value": 25
      },
      {
        "from": "Green 2021",
        "to": "Red 2025",
        "value": 8
      },
      {
        "from": "Blue 2021",
        "to": "Blue 2025",
        "value": 30
      },
      {
        "from": "Blue 2021",
        "to": "Red 2025",
        "value": 6
      },
      {
        "from": "Blue 2021",
        "to": "Did not vote",
        "value": 9
      }
    ]
  },
  "source": "Illustrative survey, in thousands of voters",
  "mobile": {
    "width": 400,
    "height": 520
  }
}