{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/flame-graph.json",
 "description": "The data prop of <FlameGraph> (Chartory chart 074).",
 "type": "object",
 "title": "FlameGraphData",
 "properties": {
  "total": {
   "type": "number",
   "description": "The total."
  },
  "xt": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The x axis ticks: [value, label] pairs."
  },
  "spans": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "FlameGraphSpan",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "d": {
      "type": "number",
      "description": "The depth (0 is the root)."
     },
     "s": {
      "type": "number",
      "description": "Where the span starts."
     },
     "e": {
      "type": "number",
      "description": "Where the span ends."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     }
    },
    "required": [
     "label",
     "d",
     "s",
     "e",
     "tok"
    ]
   },
   "description": "One entry per span."
  }
 },
 "required": [
  "total",
  "xt",
  "spans"
 ]
}
