{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/chord.json",
 "description": "The data prop of <Chord> (Chartory chart 048).",
 "type": "object",
 "title": "ChordData",
 "properties": {
  "fmt": {
   "x-function": "(v: number) => string",
   "description": "A function, so not JSON: pass it in code."
  },
  "nodes": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "ChordNode",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     }
    },
    "required": [
     "label",
     "tok"
    ]
   },
   "description": "One entry per node."
  },
  "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": [
  "nodes",
  "flows"
 ]
}
