{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/latency-field.json",
 "description": "The data prop of <LatencyField> (Chartory chart 106).",
 "type": "object",
 "title": "LatencyFieldData",
 "properties": {
  "dots": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "LatencyFieldDot",
    "properties": {
     "t": {
      "type": "number",
      "description": "The run's time."
     },
     "v": {
      "type": "number",
      "description": "The run's latency."
     },
     "s": {
      "enum": [
       "ok",
       "sel",
       "fail"
      ],
      "description": "The run's state: ok, selected or failed."
     }
    },
    "required": [
     "t",
     "v",
     "s"
    ]
   },
   "description": "One entry per dot."
  },
  "tmax": {
   "type": "number",
   "description": "The end of the time scale."
  },
  "vmin": {
   "type": "number",
   "description": "The bottom of the value scale."
  },
  "vmax": {
   "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."
  },
  "p50": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "The median, per point."
  },
  "p95": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "The 95th percentile, per point."
  },
  "timeout": {
   "type": "number",
   "description": "The timeout."
  },
  "sel": {
   "type": "object",
   "title": "LatencyFieldSel",
   "properties": {
    "t0": {
     "type": "number",
     "description": "The start time."
    },
    "t1": {
     "type": "number",
     "description": "The end time."
    },
    "v0": {
     "type": "number",
     "description": "The selection's lower latency."
    }
   },
   "required": [
    "t0",
    "t1",
    "v0"
   ],
   "description": "The selection."
  },
  "incident": {
   "type": "object",
   "title": "LatencyFieldIncident",
   "properties": {
    "t": {
     "type": "number",
     "description": "The incident's time."
    },
    "text": {
     "type": "string",
     "description": "The label as shown."
    }
   },
   "required": [
    "t",
    "text"
   ],
   "description": "The incident: time 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."
  },
  "p50Text": {
   "type": "string",
   "description": "The median's label."
  },
  "p95Text": {
   "type": "string",
   "description": "The 95th percentile's label."
  },
  "timeoutText": {
   "type": "string",
   "description": "The timeout's label."
  }
 },
 "required": [
  "dots",
  "tmax",
  "vmin",
  "vmax",
  "ticks",
  "p50",
  "p95",
  "timeout",
  "sel",
  "incident",
  "xl",
  "p50Text",
  "p95Text",
  "timeoutText"
 ]
}
