{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/span-waterfall.json",
 "description": "The data prop of <SpanWaterfall> (Chartory chart 107).",
 "type": "object",
 "title": "SpanWaterfallData",
 "properties": {
  "max": {
   "type": "number",
   "description": "The top of the value scale."
  },
  "ticks": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The axis ticks: [value, label] pairs."
  },
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "SpanWaterfallRow",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "group": {
      "type": "string",
      "description": "The group the row belongs to; rows in one group can merge."
     },
     "s": {
      "type": "number",
      "description": "Where the span starts."
     },
     "d": {
      "type": "number",
      "description": "The span's duration."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     },
     "ghost": {
      "type": "array",
      "prefixItems": [
       {
        "type": "number"
       },
       {
        "type": "number"
       }
      ],
      "minItems": 2,
      "maxItems": 2,
      "description": "The span before the fix: [start, duration]."
     }
    },
    "required": [
     "label",
     "s",
     "d",
     "tok"
    ]
   },
   "description": "One entry per row."
  },
  "now": {
   "type": "object",
   "title": "SpanWaterfallNow",
   "properties": {
    "v": {
     "type": "number",
     "description": "The value."
    },
    "text": {
     "type": "string",
     "description": "The label as shown."
    }
   },
   "required": [
    "v",
    "text"
   ],
   "description": "Now: where it is and its label."
  },
  "fix": {
   "type": "object",
   "title": "SpanWaterfallFix",
   "properties": {
    "v": {
     "type": "number",
     "description": "The value."
    },
    "text": {
     "type": "string",
     "description": "The label as shown."
    }
   },
   "required": [
    "v",
    "text"
   ],
   "description": "The value after the fix, and its label."
  }
 },
 "required": [
  "max",
  "ticks",
  "rows",
  "now",
  "fix"
 ]
}
