{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/stacked-bars.json",
 "description": "The data prop of <StackedBars> (Chartory chart 003).",
 "type": "object",
 "title": "StackedBarsData",
 "properties": {
  "max": {
   "type": "number",
   "description": "The top of the value scale."
  },
  "ticks": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "The axis tick labels."
  },
  "labels": {
   "type": "object",
   "additionalProperties": {
    "type": "string"
   },
   "description": "The labels, by index."
  },
  "ratio": {
   "type": "number",
   "description": "The gap between bars, as a share of the band."
  },
  "stacks": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "StackedBarsStack",
    "properties": {
     "name": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     },
     "vals": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "The values, in order."
     }
    },
    "required": [
     "name",
     "tok",
     "vals"
    ]
   },
   "description": "One entry per stacked part."
  }
 },
 "required": [
  "max",
  "ticks",
  "labels",
  "stacks"
 ]
}
