{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/version-ribbon.json",
 "description": "The data prop of <VersionRibbon> (Chartory chart 117).",
 "type": "object",
 "title": "VersionRibbonData",
 "properties": {
  "vers": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "The version labels, in order."
  },
  "live": {
   "type": "number",
   "description": "The live version (index)."
  },
  "cols": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "X of each version, 0..1."
  },
  "cand": {
   "type": "number",
   "description": "X of the candidate, 0..1."
  },
  "candText": {
   "type": "string",
   "description": "The candidate's label."
  },
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "VersionRibbonRow",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "shortLabel": {
      "type": "string",
      "description": "The label at the small sizes."
     },
     "vals": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "The values, in order."
     },
     "cand": {
      "type": "number",
      "description": "The candidate's value."
     },
     "fmt": {
      "x-function": "(v: number) => string",
      "description": "A function, so not JSON: pass it in code."
     },
     "short": {
      "x-function": "(v: number) => string",
      "description": "A function, so not JSON: pass it in code."
     }
    },
    "required": [
     "label",
     "vals",
     "cand"
    ]
   },
   "description": "One entry per row."
  }
 },
 "required": [
  "vers",
  "live",
  "cols",
  "cand",
  "candText",
  "rows"
 ]
}
