{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/cohort.json",
 "description": "The data prop of <Cohort> (Chartory chart 026).",
 "type": "object",
 "title": "CohortData",
 "properties": {
  "cohorts": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "CohortCohort",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "vals": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "The values, in order."
     }
    },
    "required": [
     "label",
     "vals"
    ]
   },
   "description": "One entry per cohort."
  },
  "cols": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "The column labels, in order."
  },
  "lo": {
   "type": "number",
   "description": "The low end of the colour scale."
  },
  "hi": {
   "type": "number",
   "description": "The high end of the colour scale."
  },
  "fmt": {
   "x-function": "(v: number) => string",
   "description": "A function, so not JSON: pass it in code."
  }
 },
 "required": [
  "cohorts",
  "cols",
  "lo",
  "hi"
 ]
}
