{
  "type": "object",
  "properties": {
    "datasets": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ThresholdDataset"
      }
    },
    "zones": {
      "description": "Threshold zones shared by every dataset. Ordered ascending by `upTo`; the last zone is open-ended (`upTo` undefined).",
      "type": "array",
      "items": {
        "$ref": "#/definitions/ThresholdZone"
      }
    },
    "updateFrequency": {
      "type": "number"
    },
    "loadConf": {
      "type": "object",
      "properties": {
        "type": {
          "const": "Time",
          "type": "string"
        },
        "lead": {
          "type": "number"
        },
        "lag": {
          "type": "number"
        },
        "leadUnit": {
          "$ref": "#/definitions/DweenTimeUnit"
        },
        "lagUnit": {
          "$ref": "#/definitions/DweenTimeUnit"
        },
        "alignUnit": {
          "enum": [
            "CALENDAR_445",
            "DAYS",
            "HALFHOUR",
            "HOURS",
            "MILLIS",
            "MINUTES",
            "MONTHS",
            "SECONDS",
            "WEEKS",
            "YEARS"
          ],
          "type": "string"
        }
      },
      "required": ["alignUnit", "lag", "lagUnit", "leadUnit"]
    },
    "showYAxis": {
      "type": "boolean"
    },
    "minYAxis": {
      "description": "Fixed lower bound of the y axis. When unset, the lower bound auto-ranges.",
      "type": "number"
    },
    "maxYAxis": {
      "description": "Fixed upper bound of the y axis. When unset, the upper bound auto-ranges.",
      "type": "number"
    },
    "barWidth": {
      "description": "Fixed bar width as a fraction of the plot width (0–1), normalized by column count so the\nsame value renders the same visual width across components regardless of how many columns\nthey have. Typical values are small (e.g. ~0.05). When unset, Plotly auto-sizes the bars.",
      "type": "number"
    },
    "id": {
      "type": "string"
    },
    "reportOptions": {
      "$ref": "#/definitions/ReportOptions"
    },
    "reportMode": {
      "type": "boolean"
    },
    "stateCb": {
      "type": "object"
    },
    "calendarType": {
      "const": "CALENDAR_445",
      "type": "string"
    },
    "hideHeader": {
      "type": "boolean"
    }
  },
  "required": ["datasets", "zones"],
  "definitions": {
    "ThresholdDataset": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "identifier": {
          "type": "string"
        }
      },
      "required": ["identifier"]
    },
    "ThresholdZone": {
      "type": "object",
      "properties": {
        "upTo": {
          "description": "Upper bound on the value axis. The open-ended top zone omits this (renders as \"and above\").",
          "type": "number"
        },
        "color": {
          "type": "string"
        }
      },
      "required": ["color"]
    },
    "DweenTimeUnit": {
      "enum": [
        "DAYS",
        "HALFHOUR",
        "HOURS",
        "MILLIS",
        "MINUTES",
        "MONTHS",
        "SECONDS",
        "WEEKS",
        "YEARS"
      ],
      "type": "string"
    },
    "ReportOptions": {
      "type": "object",
      "properties": {
        "fontSize": {
          "type": "string"
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
