{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/event-barcode.json",
 "description": "The data prop of <EventBarcode> (Chartory chart 061).",
 "type": "object",
 "title": "EventBarcodeData",
 "properties": {
  "seed": {
   "type": "number",
   "description": "Seeds the generated marks, so the layout is the same on every render."
  },
  "weights": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "The weights."
  },
  "xl": {
   "type": "object",
   "additionalProperties": {
    "type": "string"
   },
   "description": "The x axis labels, by index."
  },
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "EventBarcodeRow",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "n": {
      "type": "number",
      "description": "The number of events in the row."
     },
     "err": {
      "type": "number",
      "description": "The error count."
     },
     "slow": {
      "type": "number",
      "description": "The slow count."
     },
     "at": {
      "type": "array",
      "items": {
       "type": "array",
       "prefixItems": [
        {
         "type": "number"
        },
        {
         "type": "string"
        }
       ],
       "minItems": 2,
       "maxItems": 2
      },
      "description": "Given events instead of seeded ones: [hour, colour]."
     }
    },
    "required": [
     "label",
     "n",
     "err",
     "slow"
    ]
   },
   "description": "One entry per row."
  },
  "range": {
   "type": "array",
   "prefixItems": [
    {
     "type": "number"
    },
    {
     "type": "number"
    }
   ],
   "minItems": 2,
   "maxItems": 2,
   "description": "The hours across (default the day, 0 to 24)."
  }
 },
 "required": [
  "weights",
  "xl",
  "rows"
 ]
}
