{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.6/scaleBars/scale-bar.schema.json",
  "$comment": "OpenEik 0.6: folded by tools/fold-schemas-0.6.mjs from the proposal scaleBars, which 0.6 makes a rule (open questions, 156). Written by hand, not generated.",
  "title": "A viewport's scale bar",
  "description": "A graphic scale of the viewport's view, drawn at the scale the viewport prints at (Part XIV, 2.2.1): the left end of its rule on the paper, in mm from the paper's top-left corner, y down; the length in the model it stands for, in mm; where it is marked, in mm of the model from its left end (absent: 0, half its length and its length); whether it is a rule with ticks or fields filled by turns (absent: ticks); and the words over it, {scale} in them standing for the viewport's scale (absent: 1 : {scale}).",
  "type": "object",
  "properties": {
    "x": {
      "description": "The left end of the bar's rule, mm of paper from the paper's left edge.",
      "type": "number",
      "minimum": 0,
      "maximum": 10000
    },
    "y": {
      "description": "The bar's rule, mm of paper from the paper's top edge, y down.",
      "type": "number",
      "minimum": 0,
      "maximum": 10000
    },
    "length": {
      "description": "The length in the model the bar stands for, mm: on the paper it is this length over the viewport's scale.",
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    },
    "marks": {
      "description": "Where the bar is marked, mm of the model from its left end: the first 0, each more than the one before, the last its length (rule 3, checked in code). Absent: 0, half its length and its length.",
      "type": "array",
      "minItems": 2,
      "maxItems": 12,
      "items": {
        "type": "number",
        "minimum": 0,
        "maximum": 1000000
      }
    },
    "style": {
      "description": "ticks: a rule with a tick at each mark; fields: the fields between the marks filled by turns, the first filled. Absent: ticks.",
      "type": "string",
      "enum": [
        "ticks",
        "fields"
      ]
    },
    "text": {
      "description": "The words over the bar, in which {scale} stands for the viewport's scale, as the derivation writes it (the 75 of 1 : 75). Absent: 1 : {scale}.",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    }
  },
  "required": [
    "x",
    "y",
    "length"
  ],
  "x-eik-closed": true
}
