{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/dumbbell.json",
 "description": "The data prop of <Dumbbell> (Chartory chart 066).",
 "type": "object",
 "title": "DumbbellData",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "DumbbellRow",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "a": {
      "type": "number",
      "description": "The first value."
     },
     "b": {
      "type": "number",
      "description": "The second value."
     }
    },
    "required": [
     "label",
     "a",
     "b"
    ]
   },
   "description": "One entry per row."
  },
  "min": {
   "type": "number",
   "description": "The bottom of the value scale."
  },
  "max": {
   "type": "number",
   "description": "The top of the value scale."
  },
  "xt": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The x axis ticks: [value, label] pairs."
  },
  "gap": {
   "x-function": "(a: number, b: number) => string",
   "description": "A function, so not JSON: pass it in code."
  },
  "up": {
   "type": "boolean",
   "description": "A higher a is the good side (a change from b to a: success when it rises); default: the kit's lower price is good."
  }
 },
 "required": [
  "rows",
  "min",
  "max",
  "xt"
 ]
}
