{
  "type": "object",
  "properties": {
    "valueDataset": {
      "description": "Dataset identifier from which the current value is retrieved",
      "type": "string"
    },
    "minValue": {
      "description": "Minimum value of the dial; can be a number or a dataset ID if minValueType is \"dataset\"",
      "type": [
        "string",
        "number"
      ]
    },
    "minValueType": {
      "$ref": "#/definitions/ValueType",
      "description": "Type of the minValue (constant or dataset)"
    },
    "maxValue": {
      "description": "Maximum value of the dial; can be a number or a dataset ID if maxValueType is \"dataset\"",
      "type": [
        "string",
        "number"
      ]
    },
    "maxValueType": {
      "$ref": "#/definitions/ValueType",
      "description": "Type of the maxValue (constant or dataset)"
    },
    "zones": {
      "description": "Array of value zones with specific colors for display",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Zone"
      }
    },
    "hideTextValue": {
      "description": "Whether to hide the numeric value text inside the dial",
      "type": "boolean"
    },
    "hideTicks": {
      "description": "Whether to hide the tick marks on the dial",
      "type": "boolean"
    },
    "ticks": {
      "description": "Array of custom tick mark values to be shown on the dial",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Tick"
      }
    },
    "lastZone": {
      "$ref": "#/definitions/LastZone",
      "description": "Color of the last zone (optional, overrides the last zone color if set)"
    },
    "minValueOverride": {
      "description": "First value override (optional)",
      "type": "string"
    },
    "maxValueOverride": {
      "description": "Last value override (optional)",
      "type": "string"
    },
    "updateFrequency": {
      "description": "How often the dial should refresh its data, in seconds (optional)",
      "type": "number"
    },
    "ticksFontSize": {
      "description": "Font size for tick labels (optional)",
      "type": "number"
    },
    "hideValue": {
      "description": "Whether to hide the numeric value text inside the dial",
      "type": "boolean"
    }
  },
  "required": [
    "lastZone",
    "maxValue",
    "maxValueType",
    "minValue",
    "minValueType",
    "ticks",
    "valueDataset",
    "zones"
  ],
  "definitions": {
    "ValueType": {
      "description": "Defines how a min or max value is interpreted: either as a constant number or from another dataset",
      "type": "string",
      "enum": [
        "constant",
        "dataset",
        "string"
      ]
    },
    "Zone": {
      "description": "A colored zone shown on the dial, up to a specified maxValue",
      "type": "object",
      "additionalProperties": {},
      "properties": {
        "valueType": {
          "$ref": "#/definitions/ValueType",
          "description": "Type of the zone max value (constant or dataset)"
        },
        "maxValue": {
          "description": "Maximum value of the zone; can be a number or a dataset ID if valueType is \"dataset\"",
          "type": [
            "string",
            "number"
          ]
        },
        "overriddenValue": {
          "description": "String or numeric representation of the zone max value (optional)",
          "type": [
            "string",
            "number"
          ]
        },
        "color": {
          "description": "Display color for this zone",
          "type": "string"
        },
        "highlightValue": {
          "description": "Whether to highlight the current value in this zone",
          "type": "boolean"
        }
      },
      "required": [
        "color",
        "maxValue",
        "valueType"
      ]
    },
    "Tick": {
      "description": "A custom tick mark shown at a specific value on the dial",
      "type": "object",
      "properties": {
        "value": {
          "description": "Value at which the tick should be displayed",
          "type": "number"
        },
        "overriddenValue": {
          "description": "String or numeric representation of the tick value (optional)",
          "type": [
            "string",
            "number"
          ]
        }
      },
      "required": [
        "value"
      ]
    },
    "LastZone": {
      "description": "A colored zone shown on the dial, up to the last zone",
      "type": "object",
      "properties": {
        "color": {
          "description": "Display color for this zone",
          "type": "string"
        },
        "highlightValue": {
          "description": "Whether to highlight the current value in this zone",
          "type": "boolean"
        }
      },
      "required": [
        "color"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}