{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/key-timeline.json",
 "description": "The data prop of <KeyTimeline> (Chartory chart 120).",
 "type": "object",
 "title": "KeyTimelineData",
 "properties": {
  "days": {
   "type": "number",
   "description": "The number of days."
  },
  "today": {
   "type": "number",
   "description": "Where today is on the axis."
  },
  "keys": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "KeyTimelineLane",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "calls": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "The calls per day."
     },
     "total": {
      "type": "string",
      "description": "The total as shown."
     },
     "exp": {
      "type": "number",
      "description": "Expiry day (0..days) or a later date as text."
     },
     "expText": {
      "type": "string",
      "description": "The expiry as shown."
     },
     "tone": {
      "enum": [
       "warn",
       "bad"
      ],
      "description": "The tone of the mark (a colour token)."
     },
     "silent": {
      "type": "number",
      "description": "Silent since this day."
     },
     "newNet": {
      "type": "number",
      "description": "The day of the call from a new network."
     }
    },
    "required": [
     "label",
     "calls",
     "total"
    ]
   },
   "description": "One entry per key: see KeyTimelineLane."
  },
  "rotate": {
   "type": "object",
   "title": "KeyTimelineRotate",
   "properties": {
    "d0": {
     "type": "number",
     "description": "The first day."
    },
    "d1": {
     "type": "number",
     "description": "The last day."
    },
    "text": {
     "type": "string",
     "description": "The label as shown."
    }
   },
   "required": [
    "d0",
    "d1",
    "text"
   ],
   "description": "The rotation window: first day, last day and label."
  },
  "xl": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The x axis labels: [position, label] pairs."
  }
 },
 "required": [
  "days",
  "today",
  "keys",
  "rotate",
  "xl"
 ]
}
