{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://snapfile.example/spec/scene.schema.json",
  "title": "Snapfile scene graph document",
  "description": "Template document: sheets (artboards) with node trees. Units: pt, angles: degrees clockwise, y axis down, node x/y relative to the parent frame/group/repeater cell. Unknown fields are preserved and ignored by the engine; fields prefixed with x- are reserved for the editor. TZ section 2.3.",
  "type": "object",
  "required": [
    "formatVersion",
    "sheets"
  ],
  "properties": {
    "formatVersion": {
      "const": 1
    },
    "meta": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "keywords": {
          "type": "string"
        }
      }
    },
    "defaults": {
      "allOf": [
        {
          "$ref": "#/$defs/TextStyle"
        }
      ],
      "type": "object",
      "properties": {
        "locale": {
          "enum": [
            "ru",
            "en"
          ]
        }
      }
    },
    "styles": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/TextStyle"
      }
    },
    "components": {
      "type": "object"
    },
    "sheets": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/Sheet"
      }
    }
  },
  "$defs": {
    "Id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "Expr": {
      "type": "string",
      "description": "Expression without braces (visibleIf, bind, source, src): paths, literals, == != > >= < <= && || ! in + - * / % ?: and |filters. A value wrapped in {{ }} is accepted."
    },
    "Color": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"
        },
        {
          "type": "object",
          "required": [
            "cmyk"
          ],
          "properties": {
            "cmyk": {
              "type": "array",
              "items": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "minItems": 4,
              "maxItems": 4
            },
            "alpha": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          }
        }
      ]
    },
    "Size": {
      "type": "object",
      "required": [
        "w",
        "h"
      ],
      "properties": {
        "w": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "h": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      }
    },
    "Edges": {
      "type": "object",
      "properties": {
        "top": {
          "type": "number"
        },
        "right": {
          "type": "number"
        },
        "bottom": {
          "type": "number"
        },
        "left": {
          "type": "number"
        }
      }
    },
    "GradientStop": {
      "type": "object",
      "required": [
        "offset",
        "color"
      ],
      "properties": {
        "offset": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "color": {
          "$ref": "#/$defs/Color"
        }
      }
    },
    "Paint": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "solid",
            "linear",
            "radial",
            "image"
          ]
        },
        "visible": {
          "type": "boolean"
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "color": {
          "$ref": "#/$defs/Color"
        },
        "angle": {
          "type": "number",
          "description": "linear: CSS-like degrees, 90 = left to right"
        },
        "center": {
          "type": "object",
          "properties": {
            "x": {
              "type": "number"
            },
            "y": {
              "type": "number"
            }
          }
        },
        "radius": {
          "type": "number"
        },
        "stops": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GradientStop"
          }
        },
        "assetId": {
          "type": "string"
        },
        "fit": {
          "enum": [
            "cover",
            "contain",
            "fill",
            "tile"
          ]
        },
        "focal": {
          "$ref": "#/$defs/Focal"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "solid"
              }
            }
          },
          "then": {
            "required": [
              "color"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": [
                  "linear",
                  "radial"
                ]
              }
            }
          },
          "then": {
            "required": [
              "stops"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "image"
              }
            }
          },
          "then": {
            "required": [
              "assetId"
            ]
          }
        }
      ]
    },
    "Stroke": {
      "type": "object",
      "required": [
        "color"
      ],
      "properties": {
        "color": {
          "$ref": "#/$defs/Color"
        },
        "width": {
          "type": "number",
          "minimum": 0
        },
        "align": {
          "enum": [
            "center",
            "inside",
            "outside"
          ]
        },
        "dash": {
          "type": "array",
          "items": {
            "type": "number",
            "minimum": 0
          }
        },
        "cap": {
          "enum": [
            "butt",
            "round",
            "square"
          ]
        },
        "join": {
          "enum": [
            "miter",
            "round",
            "bevel"
          ]
        },
        "miterLimit": {
          "type": "number"
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "visible": {
          "type": "boolean"
        }
      }
    },
    "TextStyle": {
      "type": "object",
      "properties": {
        "fontId": {
          "type": [
            "string",
            "null"
          ],
          "description": "fnt_... id of a project/system font; the family of that face is used and weight/style pick the nearest face"
        },
        "fontFamily": {
          "type": "string"
        },
        "fontSize": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1000
        },
        "fontWeight": {
          "type": "integer",
          "minimum": 100,
          "maximum": 900
        },
        "fontStyle": {
          "enum": [
            "normal",
            "italic"
          ]
        },
        "color": {
          "$ref": "#/$defs/Color"
        },
        "letterSpacing": {
          "type": "number"
        },
        "lineHeight": {
          "oneOf": [
            {
              "type": "number",
              "exclusiveMinimum": 0
            },
            {
              "type": "object",
              "required": [
                "pt"
              ],
              "properties": {
                "pt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                }
              }
            }
          ]
        },
        "underline": {
          "type": "boolean"
        },
        "strike": {
          "type": "boolean"
        },
        "textCase": {
          "enum": [
            "none",
            "upper",
            "lower",
            "title"
          ]
        },
        "baselineShift": {
          "type": "number"
        },
        "link": {
          "type": "string"
        }
      }
    },
    "Run": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "description": "Literal text with {{ path|filter:arg }} substitutions; \\{{ escapes"
        },
        "style": {
          "$ref": "#/$defs/TextStyle"
        },
        "styleRef": {
          "type": "string"
        }
      }
    },
    "Paragraph": {
      "type": "object",
      "properties": {
        "align": {
          "enum": [
            "left",
            "center",
            "right",
            "justify"
          ]
        },
        "indent": {
          "type": "number"
        },
        "spaceBefore": {
          "type": "number",
          "minimum": 0
        },
        "spaceAfter": {
          "type": "number",
          "minimum": 0
        },
        "list": {
          "type": [
            "object",
            "null"
          ]
        },
        "runs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Run"
          }
        }
      }
    },
    "NodeBase": {
      "type": "object",
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "type": {
          "enum": [
            "frame",
            "group",
            "rect",
            "ellipse",
            "line",
            "path",
            "svg",
            "text",
            "image",
            "table",
            "repeater",
            "instance",
            "chart"
          ]
        },
        "name": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "w": {
          "type": "number",
          "minimum": 0
        },
        "h": {
          "type": "number",
          "minimum": 0
        },
        "rotation": {
          "type": "number"
        },
        "origin": {
          "type": "object",
          "properties": {
            "x": {
              "type": "number"
            },
            "y": {
              "type": "number"
            }
          }
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "blendMode": {
          "enum": [
            "normal",
            "multiply",
            "screen",
            "overlay",
            "darken",
            "lighten"
          ]
        },
        "visible": {
          "type": "boolean"
        },
        "visibleIf": {
          "oneOf": [
            {
              "$ref": "#/$defs/Expr"
            },
            {
              "type": "null"
            }
          ]
        },
        "locked": {
          "type": "boolean"
        },
        "constraints": {
          "type": "object",
          "properties": {
            "horizontal": {
              "enum": [
                "left",
                "right",
                "leftRight",
                "center",
                "scale"
              ]
            },
            "vertical": {
              "enum": [
                "top",
                "bottom",
                "topBottom",
                "center",
                "scale"
              ]
            }
          }
        },
        "fills": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Paint"
          }
        },
        "strokes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Stroke"
          }
        },
        "effects": {
          "type": "array"
        },
        "cornerRadius": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "array",
              "items": {
                "type": "number",
                "minimum": 0
              },
              "minItems": 4,
              "maxItems": 4
            }
          ]
        },
        "clip": {
          "type": "boolean"
        },
        "link": {
          "type": [
            "string",
            "null"
          ]
        },
        "bind": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Expr"
          },
          "description": "Property path -> expression. Paths: x y w h rotation opacity cornerRadius, fills.0.color, strokes.0.color, strokes.0.width; shortcuts: color (text: all runs; shape: fills.0.color), text: fontSize fontWeight letterSpacing lineHeight; frame: gap, padding, layout.gap, layout.padding.top...; repeater: gap."
        },
        "sizing": {
          "type": "object",
          "properties": {
            "w": {
              "enum": [
                "fixed",
                "hug",
                "fill"
              ]
            },
            "h": {
              "enum": [
                "fixed",
                "hug",
                "fill"
              ]
            }
          }
        },
        "pushDown": {
          "type": "boolean"
        },
        "anchorTo": {
          "type": "object",
          "required": [
            "nodeId"
          ],
          "properties": {
            "nodeId": {
              "type": "string"
            },
            "edge": {
              "const": "bottom"
            },
            "gap": {
              "type": "number"
            }
          }
        },
        "showOn": {
          "enum": [
            "all",
            "first",
            "continuation",
            "last"
          ],
          "description": "Top-level nodes of a sheet paginated by a flow repeater"
        },
        "strokeSides": {
          "type": "array",
          "items": {
            "enum": [
              "top",
              "right",
              "bottom",
              "left"
            ]
          },
          "uniqueItems": true,
          "description": "Draw strokes only on these sides of a rect/frame/image. Absent = whole outline. cornerRadius is ignored for a partial outline."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "frame"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/FrameProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "group"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/GroupProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "ellipse"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/EllipseProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "line"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/LineProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "text"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/TextProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "image"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/ImageProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "repeater"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/RepeaterProps"
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "chart"
              }
            }
          },
          "then": {
            "$ref": "#/$defs/ChartProps"
          }
        }
      ]
    },
    "Children": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NodeBase"
      }
    },
    "FrameProps": {
      "properties": {
        "children": {
          "$ref": "#/$defs/Children"
        },
        "layout": {
          "$ref": "#/$defs/AutoLayout"
        }
      }
    },
    "GroupProps": {
      "properties": {
        "children": {
          "$ref": "#/$defs/Children"
        }
      }
    },
    "EllipseProps": {
      "properties": {
        "arc": {
          "type": "object",
          "properties": {
            "start": {
              "type": "number"
            },
            "end": {
              "type": "number"
            },
            "innerRatio": {
              "type": "number",
              "minimum": 0,
              "exclusiveMaximum": 1
            }
          }
        }
      }
    },
    "LineProps": {
      "properties": {
        "points": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "TextProps": {
      "properties": {
        "content": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Paragraph"
              }
            }
          ]
        },
        "autoSize": {
          "enum": [
            "none",
            "height",
            "width"
          ]
        },
        "overflowMode": {
          "enum": [
            "clip",
            "ellipsis",
            "shrink",
            "flow"
          ]
        },
        "maxLines": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "ellipsis": {
          "type": "boolean"
        },
        "minFontSize": {
          "type": [
            "number",
            "null"
          ],
          "exclusiveMinimum": 0
        },
        "verticalAlign": {
          "enum": [
            "top",
            "middle",
            "bottom"
          ]
        },
        "paragraphSpacing": {
          "type": "number",
          "minimum": 0
        },
        "collapseEmpty": {
          "type": "boolean"
        }
      }
    },
    "ImageProps": {
      "properties": {
        "assetId": {
          "type": [
            "string",
            "null"
          ]
        },
        "src": {
          "oneOf": [
            {
              "$ref": "#/$defs/Expr"
            },
            {
              "type": "null"
            }
          ],
          "description": "Expression resolving to assetId, https URL or data:image URI"
        },
        "fit": {
          "enum": [
            "cover",
            "contain",
            "fill",
            "none"
          ]
        },
        "focal": {
          "$ref": "#/$defs/Focal"
        },
        "fallbackAssetId": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "Cell": {
      "type": "object",
      "properties": {
        "w": {
          "type": "number",
          "minimum": 0
        },
        "h": {
          "type": "number",
          "minimum": 0
        },
        "sizing": {
          "type": "object",
          "properties": {
            "h": {
              "enum": [
                "fixed",
                "hug"
              ]
            }
          }
        },
        "repeat": {
          "type": "boolean"
        },
        "children": {
          "$ref": "#/$defs/Children"
        }
      }
    },
    "RepeaterProps": {
      "required": [
        "source",
        "item"
      ],
      "properties": {
        "source": {
          "$ref": "#/$defs/Expr"
        },
        "as": {
          "type": "string",
          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
        },
        "indexAs": {
          "type": "string",
          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
        },
        "direction": {
          "enum": [
            "vertical",
            "horizontal",
            "grid"
          ]
        },
        "gap": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "object",
              "properties": {
                "row": {
                  "type": "number"
                },
                "col": {
                  "type": "number"
                }
              }
            }
          ]
        },
        "columns": {
          "type": "integer",
          "minimum": 1
        },
        "item": {
          "$ref": "#/$defs/Cell"
        },
        "header": {
          "$ref": "#/$defs/Cell"
        },
        "footer": {
          "$ref": "#/$defs/Cell"
        },
        "emptyState": {
          "$ref": "#/$defs/Cell"
        },
        "overflow": {
          "enum": [
            "clip",
            "nextPage",
            "shrink",
            "error"
          ]
        },
        "keepTogether": {
          "type": "boolean"
        },
        "keepWithNext": {
          "type": "integer",
          "minimum": 0
        },
        "maxItems": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "sort": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "by": {
              "type": "string"
            },
            "order": {
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        },
        "filter": {
          "oneOf": [
            {
              "$ref": "#/$defs/Expr"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "Sheet": {
      "type": "object",
      "required": [
        "id",
        "name",
        "children"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "name": {
          "type": "string"
        },
        "format": {
          "enum": [
            "A3",
            "A4",
            "A5",
            "Letter",
            "Legal",
            "custom"
          ]
        },
        "size": {
          "$ref": "#/$defs/Size"
        },
        "orientation": {
          "enum": [
            "portrait",
            "landscape"
          ]
        },
        "bleed": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "$ref": "#/$defs/Edges"
            }
          ]
        },
        "margins": {
          "$ref": "#/$defs/Edges"
        },
        "background": {
          "oneOf": [
            {
              "$ref": "#/$defs/Paint"
            },
            {
              "type": "null"
            }
          ]
        },
        "children": {
          "$ref": "#/$defs/Children"
        },
        "repeat": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "required": [
                "source"
              ],
              "properties": {
                "source": {
                  "$ref": "#/$defs/Expr"
                },
                "as": {
                  "type": "string"
                },
                "indexAs": {
                  "type": "string"
                },
                "maxPages": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          ]
        },
        "visibleIf": {
          "oneOf": [
            {
              "$ref": "#/$defs/Expr"
            },
            {
              "type": "null"
            }
          ]
        },
        "overflow": {
          "type": "object",
          "properties": {
            "continuationSheetId": {
              "type": [
                "string",
                "null"
              ]
            },
            "maxPages": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "pageNumbering": {
          "type": "object",
          "properties": {
            "skip": {
              "type": "boolean"
            },
            "restart": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 1
            }
          }
        },
        "export": {
          "type": "object",
          "properties": {
            "raster": {
              "type": "boolean"
            }
          }
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "format": {
                "const": "custom"
              }
            },
            "required": [
              "format"
            ]
          },
          "then": {
            "required": [
              "size"
            ]
          }
        }
      ]
    },
    "Focal": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "x": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "y": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          }
        },
        {
          "enum": [
            "center",
            "left top",
            "top",
            "right top",
            "left",
            "right",
            "left bottom",
            "bottom",
            "right bottom"
          ]
        }
      ]
    },
    "AutoLayout": {
      "type": "object",
      "description": "Auto layout of a frame. mode none (default) = absolute children.",
      "properties": {
        "mode": {
          "enum": [
            "none",
            "vertical",
            "horizontal"
          ]
        },
        "gap": {
          "type": "number",
          "minimum": 0
        },
        "padding": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "$ref": "#/$defs/Edges"
            }
          ]
        },
        "align": {
          "enum": [
            "start",
            "center",
            "end",
            "stretch"
          ],
          "description": "Cross axis, default start"
        },
        "justify": {
          "enum": [
            "start",
            "center",
            "end",
            "spaceBetween"
          ],
          "description": "Main axis, default start"
        }
      }
    },
    "ChartSegment": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "$ref": "#/$defs/Expr"
            }
          ]
        },
        "label": {
          "type": "string",
          "description": "Template with {{ }}"
        },
        "color": {
          "oneOf": [
            {
              "$ref": "#/$defs/Color"
            },
            {
              "$ref": "#/$defs/Expr"
            }
          ]
        }
      }
    },
    "ChartSeries": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Template with {{ }}; shown in the legend"
        },
        "color": {
          "oneOf": [
            {
              "$ref": "#/$defs/Color"
            },
            {
              "$ref": "#/$defs/Expr"
            }
          ]
        },
        "valueField": {
          "type": "string",
          "description": "With source: item field with the value"
        },
        "xField": {
          "type": "string",
          "description": "scatter with source"
        },
        "yField": {
          "type": "string",
          "description": "scatter with source"
        },
        "values": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "$ref": "#/$defs/Expr"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "Static values, parallel to categories; null is a gap"
        }
      }
    },
    "ChartProps": {
      "properties": {
        "chartType": {
          "enum": [
            "donut",
            "pie",
            "bar",
            "barStacked",
            "barHorizontal",
            "barHorizontalStacked",
            "line",
            "area",
            "scatter",
            "radar"
          ],
          "description": "Default donut"
        },
        "source": {
          "oneOf": [
            {
              "$ref": "#/$defs/Expr"
            },
            {
              "type": "null"
            }
          ],
          "description": "Expression -> array of items; used instead of segments"
        },
        "valueField": {
          "type": "string",
          "description": "Item field with the percent value"
        },
        "labelField": {
          "type": "string"
        },
        "colorField": {
          "type": "string",
          "description": "Optional item field with a color; otherwise palette"
        },
        "xField": {
          "type": "string",
          "description": "scatter: item field with X; default: numeric labelField, else 1, 2, 3..."
        },
        "yField": {
          "type": "string",
          "description": "scatter: item field with Y; default: valueField"
        },
        "segments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChartSegment"
          },
          "description": "Static segments (value may be an expression)"
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Static category labels for series[].values (templates with {{ }}); scatter: numeric values are X"
        },
        "series": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChartSeries"
          },
          "description": "Several series. With source: valueField per series. Static: values per series. Pie and donut show the first one"
        },
        "palette": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Color"
          },
          "description": "Repeated cyclically"
        },
        "remainderColor": {
          "$ref": "#/$defs/Color"
        },
        "outerRadius": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "pt, default = half of min(w,h)"
        },
        "innerRadius": {
          "type": "number",
          "minimum": 0,
          "description": "pt, default = 58.33% of outerRadius"
        },
        "startAngle": {
          "type": "number",
          "description": "Degrees clockwise from 12 o'clock, default 0"
        },
        "labels": {
          "type": "object",
          "properties": {
            "show": {
              "type": "boolean"
            },
            "minPct": {
              "type": "number"
            },
            "outsidePct": {
              "type": "number"
            },
            "fontFamily": {
              "type": "string"
            },
            "fontId": {
              "type": [
                "string",
                "null"
              ]
            },
            "fontSize": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "fontWeight": {
              "type": "integer"
            },
            "insideColor": {
              "$ref": "#/$defs/Color"
            },
            "outsideColor": {
              "$ref": "#/$defs/Color"
            },
            "remainderLabelColor": {
              "$ref": "#/$defs/Color"
            },
            "leaderColor": {
              "$ref": "#/$defs/Color"
            },
            "leaderWidth": {
              "type": "number",
              "minimum": 0
            },
            "decimals": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6,
              "description": "Value labels and axis numbers; default: as needed, up to 2"
            },
            "prefix": {
              "type": "string",
              "description": "Before value labels and axis numbers"
            },
            "suffix": {
              "type": "string",
              "description": "After value labels and axis numbers"
            }
          }
        },
        "center": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "line1": {
              "type": "string"
            },
            "line2": {
              "type": "string"
            },
            "value": {
              "type": "string",
              "description": "Template with {{ }}"
            },
            "fontFamily": {
              "type": "string"
            },
            "fontId": {
              "type": [
                "string",
                "null"
              ]
            },
            "lineFontSize": {
              "type": "number"
            },
            "lineFontWeight": {
              "type": "integer"
            },
            "lineColor": {
              "$ref": "#/$defs/Color"
            },
            "lineLetterSpacing": {
              "type": "number"
            },
            "valueFontSize": {
              "type": "number"
            },
            "valueFontWeight": {
              "type": "integer"
            },
            "valueColor": {
              "$ref": "#/$defs/Color"
            }
          }
        },
        "normalize": {
          "type": "boolean",
          "description": "pie and donut: scale the values to 100% instead of adding a remainder"
        },
        "legend": {
          "type": "object",
          "properties": {
            "show": {
              "type": "boolean",
              "description": "Default false"
            },
            "position": {
              "enum": [
                "top",
                "right",
                "bottom",
                "left"
              ],
              "description": "Default bottom"
            },
            "color": {
              "$ref": "#/$defs/Color"
            }
          }
        },
        "axes": {
          "type": "object",
          "properties": {
            "show": {
              "type": "boolean",
              "description": "Default true"
            },
            "min": {
              "type": "number",
              "description": "Value axis, default from the data"
            },
            "max": {
              "type": "number"
            },
            "xMin": {
              "type": "number",
              "description": "scatter X axis"
            },
            "xMax": {
              "type": "number"
            },
            "tickCount": {
              "type": "number",
              "minimum": 2,
              "maximum": 20,
              "description": "Default 5"
            },
            "nice": {
              "type": "boolean",
              "description": "Round ticks, default true"
            },
            "color": {
              "$ref": "#/$defs/Color"
            },
            "labelColor": {
              "$ref": "#/$defs/Color"
            }
          }
        },
        "grid": {
          "type": "object",
          "properties": {
            "show": {
              "type": "boolean",
              "description": "Default true"
            },
            "color": {
              "$ref": "#/$defs/Color"
            },
            "width": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          }
        },
        "markers": {
          "type": "object",
          "properties": {
            "show": {
              "type": "boolean",
              "description": "line, radar: default true; area: default false; scatter: always"
            },
            "size": {
              "type": "number",
              "exclusiveMinimum": 0,
              "description": "Diameter, pt. Default 6, scatter 8"
            }
          }
        },
        "barGap": {
          "type": "number",
          "minimum": 0,
          "maximum": 0.95,
          "description": "Share of each category slot left empty, default 0.3"
        },
        "lineWidth": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "pt, default 2"
        },
        "smooth": {
          "type": "boolean",
          "description": "line, area: curve through the points, default false"
        },
        "fillOpacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "area, radar: default 0.3"
        }
      }
    }
  }
}
