{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/sankey.json",
 "description": "The data prop of <Sankey> (Chartory chart 031).",
 "type": "object",
 "title": "SankeyData",
 "properties": {
  "left": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "SankeyLeft",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     },
     "v": {
      "type": "number",
      "description": "The value."
     }
    },
    "required": [
     "label",
     "tok",
     "v"
    ]
   },
   "description": "The nodes in the left column."
  },
  "right": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "SankeyRight",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "v": {
      "type": "number",
      "description": "The value."
     }
    },
    "required": [
     "label",
     "v"
    ]
   },
   "description": "The nodes in the right column."
  },
  "flows": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "number"
     },
     {
      "type": "number"
     }
    ],
    "minItems": 3,
    "maxItems": 3
   },
   "description": "The flows: [from index, to index, value]."
  }
 },
 "required": [
  "left",
  "right",
  "flows"
 ]
}
