{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usechartory.com/schemas/ridgeline.json",
 "description": "The data prop of <Ridgeline> (Chartory chart 055).",
 "type": "object",
 "title": "RidgelineData",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "RidgelineRow",
    "properties": {
     "label": {
      "type": "string",
      "description": "The name shown on the chart."
     },
     "tok": {
      "type": "string",
      "description": "The colour token, e.g. \"data/primary\"."
     },
     "peaks": {
      "type": "array",
      "items": {
       "type": "array",
       "prefixItems": [
        {
         "type": "number"
        },
        {
         "type": "number"
        },
        {
         "type": "number"
        }
       ],
       "minItems": 3,
       "maxItems": 3
      },
      "description": "The peaks: [centre, spread, weight]."
     }
    },
    "required": [
     "label",
     "tok",
     "peaks"
    ]
   },
   "description": "One entry per row."
  },
  "max": {
   "type": "number",
   "description": "The top of the value scale."
  },
  "xt": {
   "type": "array",
   "items": {
    "type": "array",
    "prefixItems": [
     {
      "type": "number"
     },
     {
      "type": "string"
     }
    ],
    "minItems": 2,
    "maxItems": 2
   },
   "description": "The x axis ticks: [value, label] pairs."
  }
 },
 "required": [
  "rows",
  "max",
  "xt"
 ]
}
