{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/frontier-map.json",
 "description": "The data prop of <FrontierMap> (Chartory chart 109).",
 "type": "object",
 "title": "FrontierMapData",
 "properties": {
  "xmin": {
   "type": "number",
   "description": "The left end of the x scale."
  },
  "xmax": {
   "type": "number",
   "description": "The right end of the x scale."
  },
  "ymin": {
   "type": "number",
   "description": "The bottom of the y scale."
  },
  "ymax": {
   "type": "number",
   "description": "The top of the y scale."
  },
  "xt": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The x axis ticks: [value, label] pairs."
  },
  "yt": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The y axis ticks: [value, label] pairs."
  },
  "better": {
   "type": "string",
   "description": "Which way is better."
  },
  "betterShort": {
   "type": "string",
   "description": "Which way is better, at the small sizes."
  },
  "pts": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "FrontierMapPoint",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "x": {
      "type": "number",
      "description": "The x value."
     },
     "y": {
      "type": "number",
      "description": "The y value."
     },
     "s": {
      "type": "number",
      "description": "The point's size value."
     },
     "sub": {
      "type": "string",
      "description": "The second line under the label."
     },
     "tone": {
      "const": "warning",
      "description": "The tone of the mark (a colour token)."
     },
     "off": {
      "type": "boolean",
      "description": "Marks it as off the frontier."
     }
    },
    "required": [
     "label",
     "x",
     "y",
     "s",
     "sub"
    ]
   },
   "description": "One entry per point."
  },
  "edge": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "number"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The frontier: [x, y] points."
  },
  "moves": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "FrontierMapMove",
    "properties": {
     "from": {
      "type": "string",
      "description": "Where it starts."
     },
     "to": {
      "type": "string",
      "description": "Where it ends."
     },
     "text": {
      "type": "string",
      "description": "The label as shown."
     },
     "agent": {
      "type": "string",
      "description": "The agent."
     },
     "amount": {
      "type": "string",
      "description": "The amount as shown."
     },
     "tone": {
      "enum": [
       "success",
       "warning",
       "danger",
       "info",
       "neutral",
       "primary"
      ],
      "description": "The tone of the mark (a colour token)."
     },
     "off": {
      "type": "boolean",
      "description": "Marks it as off the frontier."
     }
    },
    "required": [
     "from",
     "to",
     "text",
     "agent",
     "amount",
     "tone"
    ]
   },
   "description": "The moves."
  }
 },
 "required": [
  "xmin",
  "xmax",
  "ymin",
  "ymax",
  "xt",
  "yt",
  "pts",
  "edge",
  "moves"
 ]
}
