{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/histogram.json",
 "description": "The data prop of <Histogram> (Chartory chart 006).",
 "type": "object",
 "title": "HistogramData",
 "properties": {
  "vals": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "The values, in order."
  },
  "max": {
   "type": "number",
   "description": "The top of the value scale."
  },
  "ticks": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "The axis tick labels."
  },
  "tailFrom": {
   "type": "number",
   "description": "Where the tail starts."
  },
  "yW": {
   "type": "number",
   "description": "The width of the y axis label column, in px."
  },
  "p": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "HistogramP",
    "properties": {
     "i": {
      "type": "number",
      "description": "The index of the item it belongs to."
     },
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     },
     "side": {
      "const": "left",
      "description": "Which side the label sits on."
     }
    },
    "required": [
     "i",
     "label",
     "tok"
    ]
   },
   "description": "The marked bins: index, label and colour."
  },
  "xl": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The x axis labels: [position, label] pairs."
  }
 },
 "required": [
  "vals",
  "max",
  "ticks",
  "tailFrom",
  "p",
  "xl"
 ]
}
